home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / basic / EFMUILibSrc.lha / EFMUILibSrc / Blitzlibs / userlibs / EFMUILib.asc
Text File  |  1998-02-03  |  89KB  |  3,596 lines

  1. ;**************************************************
  2. ;*                                                *
  3. ;*            EFMUILib Version 1.4                *
  4. ;*                                                *
  5. ;* (c) 1997-1998 by VIVID Imagination             *
  6. ;**************************************************
  7. ;
  8. ;History:
  9. ;~~~~~~~~
  10. ;
  11. ;Version 1.4 (01.02.98)
  12. ;-MUIChangeBitmap and MUIChangeShape added
  13. ;-MUIRedraw added
  14. ;-MUIList changed (now works)
  15. ;-MUIListHook and MUIChangeList added
  16. ;-MUIShapeObject bug removed
  17. ;
  18. ;Version 1.3 (22.01.98) (not released)
  19. ;-MUIBitmapObject added
  20. ;-MUIShapeObject added
  21. ;-MUICreateWindow ID bug removed
  22. ;
  23. ;
  24. ;Version 1.2 (12.12.97)
  25. ;-MUIBalanceObject added
  26. ;-MUINotifyApp added
  27. ;-MUIAddObjsXXX added
  28. ;
  29. ;
  30. ;Version 1.1a (11.12.97) (not released)
  31. ;-MUIImageButton bug fixed.
  32. ;
  33. ;
  34. ;Version 1.1 (07.12.97) :
  35. ;- MUIApplicationxxx bugs removed
  36. ;- MUIDoMethod is now a command
  37. ;- Menu support added :
  38. ;    MUICreateMenu
  39. ;    MUISetMenu
  40. ;    MUIFindUData
  41. ;- Max objects set to 50 by default
  42. ;
  43. ;
  44. ;Version 1.0 (24.11.97) :
  45. ;  First release
  46. ;
  47. ;
  48. ;Commands list:
  49. ;~~~~~~~~~~~~~~
  50. ;
  51. ;MUISetMaximumTags max
  52. ;
  53. ;MUIApplicationTitle title$
  54. ;MUIApplicationVersion version$
  55. ;MUIApplicationCopyright copyright$
  56. ;MUIApplicationAuthor author$
  57. ;MUIApplicationDescription description$
  58. ;MUIApplicationBase base$
  59. ;MUIAddApplicationTags &TagList | Tag,Value [,Tag,Value...]
  60. ;MUICreateApplication
  61. ;MUIRemoveApplication
  62. ;MUIApplicationLoc
  63. ;MUIApplicationObj To MUIObject#
  64. ;MUIAddSubWindow MUIObject#
  65. ;
  66. ;MUIFreeObject MUIObject#
  67. ;
  68. ;MUICreateWindow MUIObject#,title$ [,id$ [,MUIObject#] ]
  69. ;MUIOpenWindow MUIObject#
  70. ;MUICloseWindow MUIObject#
  71. ;
  72. ;MUICreateMenu MUIObject#,GTMenuList#,Flags [,TitleUData1 [,...]]
  73. ;MUISetMenu To MUIObject#,MUIObject#
  74. ;
  75. ;MUIObjLoc (MUIObject#)
  76. ;
  77. ;MUIRequest To MUIObject#,Flags,Title$,Gadgets$,Format$  [,Param...]
  78. ;
  79. ;MUIAddTags MUIObject#,&TagList | MUIObject#,Tag,Value [,Tag,Value...]
  80. ;
  81. ;MUINewObject MUIObject#,Class$,&TagList | MUIObject#,Class$,Tag,Value [,Tag,Value...]
  82. ;MUIMakeObject MUIObject#,Type,&TagList | MUIObject#,Type,Tag,Value [,Tag,Value...]
  83. ;
  84. ;MUIHVSpace MUIObject#
  85. ;MUIHSpace MUIObject#,x
  86. ;MUIVSpace MUIObject#,x
  87. ;MUIString MUIObject#,Contents$,MaxLen
  88. ;MUIKeyString MUIObject#,Contents,MaxLen,ControlChar$
  89. ;MUICheckMark MUIObject#,Selected
  90. ;MUIKeyCheckMark MUIObject#,Selected,ControlChar$
  91. ;MUISimpleButton MUIObject#,Name$
  92. ;MUIKeyButton MUIObject#,Name$,Key$
  93. ;MUICycle MUIObject#,  Entry$ [,Entry$...] | *Array
  94. ;MUIKeyCycle MUIObject#,Key$,  Entry$ [,Entry$...] | *Array
  95. ;MUIRadio MUIObject#,Name$,  Entry$ [,Entry$...] | *Array
  96. ;MUIKeyRadio MUIObject#,Key$,Name$,  Entry$ [,Entry$...] | *Array
  97. ;MUISlider MUIObject#,Min,Max,Level
  98. ;MUIKeySlider MUIObject#,Min,Max,Level,Key$
  99. ;MUILabel MUIObject#,Label$,Flags
  100. ;MUINumericButton MUIObject#,Format$,Min,Max
  101. ;MUIListHook On|Off
  102. ;MUIList MUIObject#,Format$,Array$()
  103. ;MUIChangeList MUIObject# [,Array$(),Position]
  104. ;MUIListview To MUIObject#,MUIObject#
  105. ;MUIPopButton MUIObject#,Image
  106. ;MUIImageButton MUIObject#,Shape#
  107. ;MUIBalanceObject MUIObject#
  108. ;MUIBitmapObject MUIObject#,BitMap# [,Palette#]
  109. ;MUIShapeObject MUIObject#,Shape# [,Palette#]
  110. ;
  111. ;MUIChangeBitmap MUIObject#,Bitmap# [,Palette#]
  112. ;MUIChangeShape MUIObject#,Shape# [,Palette#]
  113. ;
  114. ;MUIAddObjHGroup To MUIObject#,MUIObject#
  115. ;MUICreateHGroup MUIObject#
  116. ;MUIAddObjVGroup To MUIObject#,MUIObject#
  117. ;MUICreateVGroup MUIObject#
  118. ;MUIAddObjPage To MUIObject#,MUIObject#
  119. ;MUICreatePage MUIObject#  ,Page1$ [,Page2$...] | &Page$(0)
  120. ;
  121. ;MUIAddObjsHGroup To MUIObject#,MUIObject# [,MUIObject# [,...]]
  122. ;MUIAddObjsVGroup To MUIObject#,MUIObject# [,MUIObject# [,...]]
  123. ;MUIAddObjsPage To MUIObject#,MUIObject# [,MUIObject# [,...]]
  124. ;
  125. ;MUIInsertSingle MUIObject#,Position,  Entry$ [,Entry$...] | *Array
  126. ;MUIRemoveSingle MUIObject#,Position
  127. ;MUIRedrawSingle MUIObject#,Position
  128. ;MUIListTitle MUIObject#,  Title$ [,Title$...] | *Array
  129. ;
  130. ;MUISet MUIObject#,&TagList | MUIObject#,Attr,Value [,Attr,Value...]
  131. ;MUIGet (MUIObject#,Attribute)
  132. ;MUIRedraw MUIObject#,Flags
  133. ;
  134. ;MUIDoMethod MUIObject#,  Method,Tag [,Tag] | &TagList
  135. ;MUINotify MUIObject#,Tag,Value,MUIObject#,  Tag [,Tag...] | &TagList
  136. ;MUINotifyApp MUIObject#,Tag,Value,Return_ID
  137. ;MUIEvent
  138. ;MUIWaitEvent
  139. ;MUIFindUData To MUIObject#,MUIObject#,UserData
  140. ;
  141.  
  142. ;*************
  143. ;*** TO DO ***
  144. ;*************
  145.  
  146. ;
  147. ; - Another command : MUIGetString$ (and perhaps set...)
  148. ;
  149.  
  150. ;************
  151. ;*** BUGS ***
  152. ;************
  153.  
  154. ;
  155. ; - Some problems reported with 68060
  156. ;
  157. ; - Some problems with MUIChangeShape and MUIChangeBitmap
  158. ;
  159.  
  160. ;****************
  161. ;*** Lib Init ***
  162. ;****************
  163.  
  164. .libinit:
  165.  
  166. #First_Compile=0   ;Set it to 1 if EFMUILib is not installed yet.
  167.  
  168. #rigtmenulib=37
  169. #bbmuilib=8        ;Change it if 8 is not a free lib number
  170.  
  171. !libheader{#bbmuilib,init,0,finit,0}
  172.  
  173. !dumtoke{"MUIObject","A MUI object",_toke}
  174.  
  175. !astatement
  176. !args        {#long}
  177. !libs
  178. !subs        {_setmaxtags,0,0}
  179. !name        {"MUISetMaximumTags","max"}
  180.  
  181. !astatement
  182. !args        {#string}
  183. !libs
  184. !subs        {_apptitle,0,0}
  185. !name        {"MUIApplicationTitle","title$"}
  186.  
  187. !astatement
  188. !args        {#string}
  189. !libs
  190. !subs        {_appver,0,0}
  191. !name        {"MUIApplicationVersion","ver$"}
  192.  
  193. !astatement
  194. !args        {#string}
  195. !libs
  196. !subs        {_appcr,0,0}
  197. !name        {"MUIApplicationCopyright","copyright$"}
  198.  
  199. !astatement
  200. !args        {#string}
  201. !libs
  202. !subs        {_appauthor,0,0}
  203. !name        {"MUIApplicationAuthor","author$"}
  204.  
  205. !astatement
  206. !args        {#string}
  207. !libs
  208. !subs        {_appdesc,0,0}
  209. !name        {"MUIApplicationDescription","desc$"}
  210.  
  211. !astatement
  212. !args        {#string}
  213. !libs
  214. !subs        {_appbase,0,0}
  215. !name        {"MUIApplicationBase","base$"}
  216.  
  217.  
  218. !astatement
  219. ;
  220. !repargs     {0,1,#long}
  221. !libs
  222. !subs        {_addapptags,0,0}
  223. ;
  224. !args        {#long}
  225. !libs
  226. !subs        {_addapptagsa,0,0}
  227. ;
  228. !name        {"MUIAddApplicationTags","&TagList | Tag,Value [,Tag,Value...]"}
  229.  
  230.  
  231. !acommand    {#long}
  232. !args
  233. !libs
  234. !subs        {_createapp,0,0}
  235. !name        {"MUICreateApplication",""}
  236.  
  237. !astatement
  238. !args
  239. !libs
  240. !subs        {_removeapp,0,0}
  241. !name        {"MUIRemoveApplication",""}
  242.  
  243. !afunction   {#long}
  244. !args
  245. !libs
  246. !subs        {_apploc,0,0}
  247. !name        {"MUIApplicationLoc",""}
  248.  
  249. !acommand    {#long}
  250. !args        {#word}
  251. !libs        {#bbmuilib,#ia3|#pd0}
  252. !subs        {_appobj,0,0}
  253. !name        {"MUIApplicationObj","To MUIObject#"}
  254.  
  255.  
  256. !acommand    {#long}
  257. !args        {#word}
  258. !libs        {#bbmuilib,#ia3|#pd0}
  259. !subs        {_appwin,0,0}
  260. !name        {"MUIAddSubWindow","MUIObject#"}
  261.  
  262. !astatement
  263. !args        {#word}
  264. !libs        {#bbmuilib,#ia3|#pd0}
  265. !subs        {_freeobj,0,0}
  266. !name        {"MUIFreeObject","MUIObject#"}
  267.  
  268.  
  269. !acommand    {#long}
  270. ;
  271. !args        {#word,#string,#string,#word}
  272. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia0|#pd3}
  273. !subs        {_createwin,0,0}
  274. ;
  275. !args        {#word,#string,#string}
  276. !libs        {#bbmuilib,#ia3|#pd0}
  277. !subs        {_createwin1,0,0}
  278. ;
  279. !args        {#word,#string}
  280. !libs        {#bbmuilib,#ia3|#pd0}
  281. !subs        {_createwin2,0,0}
  282. ;
  283. !name        {"MUICreateWindow","MUIObject#,title$ [,id$ [,MUIObject#]]"}
  284.  
  285. !acommand    {#word}
  286. !args        {#word}
  287. !libs        {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
  288. !subs        {_openwin,0,0}
  289. !name        {"MUIOpenWindow","MUIObject#"}
  290.  
  291. !acommand    {#word}
  292. !args        {#word}
  293. !libs        {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
  294. !subs        {_closewin,0,0}
  295. !name        {"MUICloseWindow","MUIObject#"}
  296.  
  297. !astatement
  298. ;
  299. !repargs     {1,1,#word,#long}
  300. !libs        {#bbmuilib,#ia3|#pd0}
  301. !subs        {_addobjtags,0,0}
  302. ;
  303. !args        {#word,#long}
  304. !libs        {#bbmuilib,#ia3|#pd0}
  305. !subs        {_addobjtagsa,0,0}
  306. ;
  307. !name        {"MUIAddTags","MUIObject#,&TagList | MUIObject#,Tag,Value [,Tag,Value...]"}
  308.  
  309.  
  310. !acommand    {#long}
  311. ;
  312. !repargs     {2,1,#word,#string,#long}
  313. !libs        {#bbmuilib,#ia3|#pd0}
  314. !subs        {_muinewobj,0,0}
  315. ;
  316. !args        {#word,#string,#long}
  317. !libs        {#bbmuilib,#ia3|#pd0}
  318. !subs        {_muinewobja,0,0}
  319. ;
  320. !name        {"MUINewObject","MUIObject#,Class$,&TagList | MUIObject#,Class$,Tag,Value [,Tag,Value...]"}
  321.  
  322. !acommand    {#long}
  323. ;
  324. !repargs     {2,1,#word,#long,#long}
  325. !libs        {#bbmuilib,#ia3|#pd0}
  326. !subs        {_muimakeobj,0,0}
  327. ;
  328. !args        {#word,#long,#long}
  329. !libs        {#bbmuilib,#ia3|#pd0}
  330. !subs        {_muimakeobja,0,0}
  331. ;
  332. !name        {"MUIMakeObject","MUIObject#,Type,&TagList | MUIObject#,Type,Tag,Value [,Tag,Value...]"}
  333.  
  334. !acommand    {#long}
  335. !args        {#word}
  336. !libs        {#bbmuilib,#ia3|#pd0}
  337. !subs        {_hvspace,0,0}
  338. !name        {"MUIHVSpace","MUIObject#"}
  339.  
  340. !acommand    {#long}
  341. !args        {#word,#long}
  342. !libs        {#bbmuilib,#ia3|#pd0}
  343. !subs        {_hspace,0,0}
  344. !name        {"MUIHSpace","MUIObject#,x"}
  345.  
  346. !acommand    {#long}
  347. !args        {#word,#long}
  348. !libs        {#bbmuilib,#ia3|#pd0}
  349. !subs        {_vspace,0,0}
  350. !name        {"MUIVSpace","MUIObject#,x"}
  351.  
  352. !acommand    {#long}
  353. !args        {#word,#string,#long}
  354. !libs        {#bbmuilib,#ia3|#pd0}
  355. !subs        {_string,0,0}
  356. !name        {"MUIString","MUIObject#,Contents$,MaxLen"}
  357.  
  358. !acommand    {#long}
  359. !args        {#word,#string,#long,#string}
  360. !libs        {#bbmuilib,#ia3|#pd0}
  361. !subs        {_keystring,0,0}
  362. !name        {"MUIKeyString","MUIObject#,Contents$,MaxLen,ControlChar$"}
  363.  
  364. !acommand    {#long}
  365. !args        {#word,#long}
  366. !libs        {#bbmuilib,#ia3|#pd0}
  367. !subs        {_checkmark,0,0}
  368. !name        {"MUICheckMark","MUIObject#,Selected"}
  369.  
  370. !acommand    {#long}
  371. !args        {#word,#long,#string}
  372. !libs        {#bbmuilib,#ia3|#pd0}
  373. !subs        {_keycheckmark,0,0}
  374. !name        {"MUIKeyCheckMark","MUIObject#,Selected,ControlChar$"}
  375.  
  376. !acommand    {#long}
  377. !args        {#word,#string}
  378. !libs        {#bbmuilib,#ia3|#pd0}
  379. !subs        {_simplebutton,0,0}
  380. !name        {"MUISimpleButton","MUIObject#,Name$"}
  381.  
  382. !acommand    {#long}
  383. !args        {#word,#string,#string}
  384. !libs        {#bbmuilib,#ia3|#pd0}
  385. !subs        {_keybutton,0,0}
  386. !name        {"MUIKeyButton","MUIObject#,Name$,Key$"}
  387.  
  388. !acommand    {#long}
  389. ;
  390. !args        {#word,#long}
  391. !libs        {#bbmuilib,#ia3|#pd0}
  392. !subs        {_cyclea,0,0}
  393. ;
  394. !repargs     {1,1,#word,#string}
  395. !libs        {#bbmuilib,#ia3|#pd0}
  396. !subs        {_cycle,0,0}
  397. ;
  398. !name        {"MUICycle","MUIObject#,  Entry$ [,Entry$...] | *Array"}
  399.  
  400. !acommand    {#long}
  401. ;
  402. !args        {#word,#string,#long}
  403. !libs        {#bbmuilib,#ia3|#pd0}
  404. !subs        {_keycyclea,0,0}
  405. ;
  406. !repargs     {2,1,#word,#string,#string}
  407. !libs        {#bbmuilib,#ia3|#pd0}
  408. !subs        {_keycycle,0,0}
  409. ;
  410. !name        {"MUIKeyCycle","MUIObject#,Key$,  Entry$ [,Entry$...] | *Array"}
  411.  
  412. !acommand    {#long}
  413. ;
  414. !args        {#word,#string,#long}
  415. !libs        {#bbmuilib,#ia3|#pd0}
  416. !subs        {_radioa,0,0}
  417. ;
  418. !repargs     {2,1,#word,#string,#string}
  419. !libs        {#bbmuilib,#ia3|#pd0}
  420. !subs        {_radio,0,0}
  421. ;
  422. !name        {"MUIRadio","MUIObject#,Name$,  Entry$ [,Entry$...] | *Array"}
  423.  
  424. !acommand    {#long}
  425. ;
  426. !args        {#word,#string,#string,#long}
  427. !libs        {#bbmuilib,#ia3|#pd0}
  428. !subs        {_keyradioa,0,0}
  429. ;
  430. !repargs     {3,1,#word,#string,#string,#string}
  431. !libs        {#bbmuilib,#ia3|#pd0}
  432. !subs        {_keyradio,0,0}
  433. ;
  434. !name        {"MUIKeyRadio","MUIObject#,Name$,Key$,  Entry$ [,Entry$...] | *Array"}
  435.  
  436. !acommand    {#long}
  437. !args        {#word,#long,#long,#long}
  438. !libs        {#bbmuilib,#ia3|#pd0}
  439. !subs        {_slider,0,0}
  440. !name        {"MUISlider","MUIObject#,Min,Max,Level"}
  441.  
  442. !acommand    {#long}
  443. !args        {#word,#long,#long,#long,#string}
  444. !libs        {#bbmuilib,#ia3|#pd0}
  445. !subs        {_keyslider,0,0}
  446. !name        {"MUIKeySlider","MUIObject#,Min,Max,Level,Key$"}
  447.  
  448. !acommand    {#long}
  449. !args        {#word,#string,#long}
  450. !libs        {#bbmuilib,#ia3|#pd0}
  451. !subs        {_label,0,0}
  452. !name        {"MUILabel","MUIObject#,Label$,Flags"}
  453.  
  454.  
  455. !acommand    {#long}
  456. !args        {#word,#word}
  457. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia2|#pd1}
  458. !subs        {_addobjhgroup,0,0}
  459. !name        {"MUIAddObjHGroup","To MUIObject#,MUIObject#"}
  460.  
  461. !acommand    {#long}
  462. !args        {#word}
  463. !libs        {#bbmuilib,#ia3|#pd0}
  464. !subs        {_createhgroup,0,0}
  465. !name        {"MUICreateHGroup","MUIObject#"}
  466.  
  467. !acommand    {#long}
  468. !args        {#word,#word}
  469. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia2|#pd1}
  470. !subs        {_addobjvgroup,0,0}
  471. !name        {"MUIAddObjVGroup","To MUIObject#,MUIObject#"}
  472.  
  473. !acommand    {#long}
  474. !args        {#word}
  475. !libs        {#bbmuilib,#ia3|#pd0}
  476. !subs        {_createvgroup,0,0}
  477. !name        {"MUICreateVGroup","MUIObject#"}
  478.  
  479.  
  480. !astatement
  481. ;
  482. !args        {#word,#long}
  483. !libs        {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
  484. !subs        {_muiseta,0,0}
  485. ;
  486. !repargs     {1,1,#word,#long}
  487. !libs        {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
  488. !subs        {_muiset,0,0}
  489. ;
  490. !name        {"MUISet","MUIObject#,&TagList | MUIObject#,Attr,Value [,Attr,Value...]"}
  491.  
  492. !afunction   {#long}
  493. !args        {#word,#long}
  494. !libs        {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
  495. !subs        {_muiget,0,0}
  496. !name        {"MUIGet","(MUIObject#,Attribute)"}
  497.  
  498.  
  499. !acommand    {#long}
  500. ;
  501. !repargs     {2,1,#word,#long,#long}
  502. !libs        {#bbmuilib,#ia3|#pd0}
  503. !subs        {_dmethod,0,0}
  504. ;
  505. !args        {#word,#long,#long}
  506. !libs        {#bbmuilib,#ia3|#pd0}
  507. !subs        {_dmethoda,0,0}
  508. ;
  509. !name        {"MUIDoMethod","MUIObject#,Method,  Tag [,Tag...] | &TagList"}
  510.  
  511.  
  512. !astatement
  513. ;
  514. !repargs     {4,1,#word,#long,#long,#word,#long}
  515. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia0|#pd3}
  516. !subs        {_notify,0,0}
  517. ;
  518. !args        {#word,#long,#long,#word,#long}
  519. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia0|#pd3}
  520. !subs        {_notifya,0,0}
  521. ;
  522. !name        {"MUINotify","MUIObject#,Tag,Value,MUIObject#,  Tag [,Tag...] | &TagList"}
  523.  
  524. !afunction   {#long}
  525. !args
  526. !libs
  527. !subs        {_event,0,0}
  528. !name        {"MUIEvent",""}
  529.  
  530. !afunction   {#long}
  531. !args
  532. !libs
  533. !subs        {_waitevent,0,0}
  534. !name        {"MUIWaitEvent",""}
  535.  
  536. !acommand    {#long}
  537. !args        {#word,#string,#long,#long}
  538. !libs        {#bbmuilib,#ia3|#pd0}
  539. !subs        {_numbutton,0,0}
  540. !name        {"MUINumericButton","MUIObject#,Format$,Min,Max"}
  541.  
  542. !acommand    {#long}
  543. !args        {#word,#word}
  544. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia2|#pd1}
  545. !subs        {_addobjpage,0,0}
  546. !name        {"MUIAddObjPage","To MUIObject#,MUIObject#"}
  547.  
  548. !acommand    {#long}
  549. ;
  550. !args        {#word,#long}
  551. !libs        {#bbmuilib,#ia3|#pd0}
  552. !subs        {_createpagea,0,0}
  553. ;
  554. !repargs     {1,1,#word,#string}
  555. !libs        {#bbmuilib,#ia3|#pd0}
  556. !subs        {_createpage,0,0}
  557. ;
  558. !name        {"MUICreatePage","MUIObject#  ,Page1$ [,Page2$...] | &Page$(0)"}
  559.  
  560. !acommand    {#long}
  561. ;
  562. !args        {#word,#string,#array}
  563. !libs        {#bbmuilib,#ia3|#pd0}
  564. !subs        {_list,0,0}
  565. ;
  566. !name        {"MUIList","MUIObject#,Format$,Array$()"}
  567.  
  568. !acommand    {#long}
  569. !args        {#word,#word}
  570. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia0|#pd1}
  571. !subs        {_listview,0,0}
  572. !name        {"MUIListView","To MUIObject#,MUIObject#"}
  573.  
  574. !afunction   {#long}
  575. !args        {#word}
  576. !libs        {#bbmuilib,#ia3|#pd0}
  577. !subs        {_objloc,0,0}
  578. !name        {"MUIObjLoc","(MUIObject#)"}
  579.  
  580. !acommand    {#long}
  581. ;
  582. !args        {#word,#long,#string,#string,#string}
  583. !libs        {#bbmuilib,#ia3|#pd0}
  584. !subs        {_request,0,0}
  585. ;
  586. !repargs     {5,1,#word,#long,#string,#string,#string,#long}
  587. !libs        {#bbmuilib,#ia3|#pd0}
  588. !subs        {_request,0,0}
  589. ;
  590. !name        {"MUIRequest","To MUIObject#,Flags,Title$,Gadgets$,Format$  [,Param...]"}
  591.  
  592. !acommand    {#long}
  593. !args        {#word,#long}
  594. !libs        {#bbmuilib,#ia3|#pd0}
  595. !subs        {_popbutton,0,0}
  596. !name        {"MUIPopButton","MUIObject#,Image"}
  597.  
  598. !acommand    {#long}
  599. !args        {#word,#word}
  600. !libs        {#bbmuilib,#ia3|#pd0,#shapeslib,#ia0|#pd1}
  601. !subs        {_imagebutton,0,0}
  602. !name        {"MUIImageButton","MUIObject#,Shape#"}
  603.  
  604. !acommand    {#long}
  605. ;
  606. !args        {#word,#long,#long}
  607. !libs        {#bbmuilib,#ia3|#pd0}
  608. !subs        {_insertsinglea,0,0}
  609. ;
  610. !repargs     {2,1,#word,#long,#string}
  611. !libs        {#bbmuilib,#ia3|#pd0}
  612. !subs        {_insertsingle,0,0}
  613. ;
  614. !name        {"MUIInsertSingle","MUIObject#,Position,  Entry$ [,Entry$...] | *Array"}
  615.  
  616. !acommand    {#long}
  617. !args        {#word,#long}
  618. !libs        {#bbmuilib,#ia3|#pd0}
  619. !subs        {_removesingle,0,0}
  620. !name        {"MUIRemoveSingle","MUIObject#,Position"}
  621.  
  622. !acommand    {#long}
  623. !args        {#word,#long}
  624. !libs        {#bbmuilib,#ia3|#pd0}
  625. !subs        {_redrawsingle,0,0}
  626. !name        {"MUIRedrawSingle","MUIObject#,Position"}
  627.  
  628. !acommand    {#long}
  629. ;
  630. !args        {#word,#long}
  631. !libs        {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
  632. !subs        {_listtitlea,0,0}
  633. ;
  634. !repargs     {1,1,#word,#string}
  635. !libs        {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
  636. !subs        {_listtitle,0,0}
  637. ;
  638. !name        {"MUIListTitle","MUIObject#,  Title$ [,Title$...] | *Array"}
  639.  
  640. !acommand    {#long}
  641. ;
  642. !args        {#word,#word,#long}
  643. !libs        {#bbmuilib,#ia3|#pd0,#rigtmenulib,#ia2|#pd1}
  644. !subs        {_createmenu,0,0}
  645. ;
  646. !repargs     {3,1,#word,#word,#long,#long}
  647. !libs        {#bbmuilib,#ia3|#pd0,#rigtmenulib,#ia1|#pd1}
  648. !subs        {_createmenud,0,0}
  649. ;
  650. !name        {"MUICreateMenu","MUIObject#,GTMenuList#,Flags [,TitleUData1 [,...]]"}
  651.  
  652. !acommand    {#long}
  653. !args        {#word,#word}
  654. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia2|#pd1}
  655. !subs        {_setmenu,0,0}
  656. !name        {"MUISetMenu","To MUIObject#,MUIObject#"}
  657.  
  658. !acommand    {#long}
  659. !args        {#word,#word,#long}
  660. !libs        {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia2|#pd1}
  661. !subs        {_findudata,0,0}
  662. !name        {"MUIFindUData","To MUIObject#,MUIObject#,UserData"}
  663.  
  664. !acommand    {#long}
  665. !args        {#word}
  666. !libs        {#bbmuilib,#ia3|#pd0}
  667. !subs        {_balance,0,0}
  668. !name        {"MUIBalanceObject","MUIObject#"}
  669.  
  670. !astatement
  671. !args        {#word,#long,#long,#long}
  672. !libs        {#bbmuilib,#ia3|#pd0}
  673. !subs        {_notifyapp,0,0}
  674. !name        {"MUINotifyApp","MUIObject#,Tag,Value,ReturnID"}
  675.  
  676. CNIF #First_Compile=0
  677.  
  678. !astatement
  679. !repargs     {1,1,#word,#word}
  680. !libs
  681. !subs        {_addobjh,0,0}
  682. !name        {"MUIAddObjsHGroup","To MUIObject#,MUIObject# [,MUIObject# [,...]]"}
  683.  
  684. !astatement
  685. !repargs     {1,1,#word,#word}
  686. !libs
  687. !subs        {_addobjv,0,0}
  688. !name        {"MUIAddObjsVGroup","To MUIObject#,MUIObject# [,MUIObject# [,...]]"}
  689.  
  690. !astatement
  691. !repargs     {1,1,#word,#word}
  692. !libs
  693. !subs        {_addobjp,0,0}
  694. !name        {"MUIAddObjsPage","To MUIObject#,MUIObject# [,MUIObject# [,...]]"}
  695.  
  696. CEND
  697.  
  698. !acommand    {#long}
  699. ;
  700. !args        {#word,#word}
  701. !libs        {#bbmuilib,#ia3|#pd0,#bitmaplib,#ia2|#pd1}
  702. !subs        {_bitmap,0,0}
  703. ;
  704. !args        {#word,#word,#word}
  705. !libs        {#bbmuilib,#ia3|#pd0,#bitmaplib,#ia2|#pd1,#palettelib,#ia0|#pd2}
  706. !subs        {_bitmappal,0,0}
  707. ;
  708. !name        {"MUIBitmapObject","MUIObject#,BitMap# [,Palette#]"}
  709.  
  710. !acommand    {#long}
  711. ;
  712. !args        {#word,#word}
  713. !libs        {#bbmuilib,#ia3|#pd0,#shapeslib,#ia2|#pd1}
  714. !subs        {_shape,0,0}
  715. ;
  716. !args        {#word,#word,#word}
  717. !libs        {#bbmuilib,#ia3|#pd0,#shapeslib,#ia2|#pd1,#palettelib,#ia0|#pd2}
  718. !subs        {_shapepal,0,0}
  719. ;
  720. !name        {"MUIShapeObject","MUIObject#,Shape# [,Palette#]"}
  721.  
  722. !acommand    {#long}
  723. ;
  724. !args        {#word,#word}
  725. !libs        {#bbmuilib,#ia3|#pd0,#bitmaplib,#ia2|#pd1,#intuitionlib,#la6}
  726. !subs        {_chbitmap,0,0}
  727. ;
  728. !args        {#word,#word,#word}
  729. !libs        {#bbmuilib,#ia3|#pd0,#bitmaplib,#ia2|#pd1,#palettelib,#ia0|#pd2,#intuitionlib,#la6}
  730. !subs        {_chbitmappal,0,0}
  731. ;
  732. !name        {"MUIChangeBitmap","MUIObject#,BitMap# [,Palette#]"}
  733.  
  734. !acommand    {#long}
  735. ;
  736. !args        {#word,#word}
  737. !libs        {#bbmuilib,#ia3|#pd0,#shapeslib,#ia2|#pd1,#intuitionlib,#la6}
  738. !subs        {_chshape,0,0}
  739. ;
  740. !args        {#word,#word,#word}
  741. !libs        {#bbmuilib,#ia3|#pd0,#shapeslib,#ia2|#pd1,#palettelib,#ia0|#pd2,#intuitionlib,#la6}
  742. !subs        {_chshapepal,0,0}
  743. ;
  744. !name        {"MUIChangeShape","MUIObject#,Shape# [,Palette#]"}
  745.  
  746. !acommand    {#long}
  747. !args        {#word,#long}
  748. !libs        {#bbmuilib,#ia3|#pd0}
  749. !subs        {_redraw,0,0}
  750. !name        {"MUIRedraw","MUIObject#,Flags"}
  751.  
  752. !astatement
  753. !args        {#long}
  754. !libs
  755. !subs        {_listhook,0,0}
  756. !name        {"MUIListHook","On|Off"}
  757.  
  758. !acommand    {#long}
  759. ;
  760. !args        {#word}
  761. !libs        {#bbmuilib,#ia3|#pd0}
  762. !subs        {_chlist,0,0}
  763. ;
  764. !args        {#word,#array,#long}
  765. !libs        {#bbmuilib,#ia3|#pd0}
  766. !subs        {_chlista,0,0}
  767. ;
  768. !name        {"MUIChangeList","MUIObject# [,Array$(),Position]"}
  769.  
  770.  
  771. _load:!nullsub{0,0,0}
  772. _save:!nullsub{0,0,0}
  773. _use:!nullsub{0,0,0}
  774. _free:!nullsub{_freeobj,0,0}
  775.  
  776. init:!nullsub{_codeinit,0,0}
  777. finit:!nullsub{_codefinit,0,0}
  778.  
  779. !libfin{_toke,_load,_save,_use,_free,50,5}
  780.  
  781. .libfinit
  782.  
  783. ;***************
  784. ;*** DEFINES ***
  785. ;***************
  786.  
  787.  
  788. #_LVOOpenLibrary=-552
  789. #_LVOCloseLibrary=-414
  790.  
  791. Macro   CALLEXEC
  792.         MOVEA.l 4,a6
  793.         JSR     _LVO`1(a6)
  794. End Macro
  795.  
  796. #_LVOMUI_NewObjectA=-30         ;(class,tags)(a0,a1)
  797. #_LVOMUI_DisposeObject=-36      ;(obj)(a0)
  798. #_LVOMUI_RequestA=-42           ;(app,win,flags,title,gadgets,format,params)(d0,d1,d2,a0,a1,a2,a3)
  799. #_LVOMUI_AllocAslRequest=-48    ;(type,tags)(d0,a0)
  800. #_LVOMUI_AslRequest=-54         ;(req,tags)(a0,a1)
  801. #_LVOMUI_FreeAslRequest=-60     ;(req)(a0)
  802. #_LVOMUI_Error=-66              ;()()
  803. #_LVOMUI_SetError=-72           ;(errnum)(d0)
  804. #_LVOMUI_GetClass=-78           ;(name)(a0)
  805. #_LVOMUI_FreeClass=-84          ;(cl)(a0)
  806. #_LVOMUI_RequestIDCMP=-90       ;(obj,flags)(a0,d0)
  807. #_LVOMUI_RejectIDCMP=-96        ;(obj,flags)(a0,d0)
  808. #_LVOMUI_Redraw=-102            ;(obj,flags)(a0,d0)
  809. #_LVOMUI_CreateCustomClass=-108 ;(base,supername,supermcc,datasize,dispatcher)(a0,a1,a2,d0,a3)
  810. #_LVOMUI_DeleteCustomClass=-114 ;(mcc)(a0)
  811. #_LVOMUI_MakeObjectA=-120       ;(Type,params)(d0,a0)
  812. #_LVOMUI_Layout=-126            ;(obj,l,t,w,h,flags)(a0,d0,d1,d2,d3,d4)
  813. #_LVOMUI_ObtainPen=-156         ;(mri,spec,flags)(a0,a1,d0)
  814. #_LVOMUI_ReleasePen=-162        ;(mri,pen)(a0,d0)
  815. #_LVOMUI_AddClipping=-168       ;(mri,l,t,w,h)(a0,d0,d1,d2,d3)
  816. #_LVOMUI_RemoveClipping=-174    ;(mri,h)(a0,a1)
  817. #_LVOMUI_AddClipRegion=-180     ;(mri,region)(a0,a1)
  818. #_LVOMUI_RemoveClipRegion=-186  ;(mri,region)(a0,a1)
  819. #_LVOMUI_BeginRefresh=-192      ;(mri,flags)(a0,d0)
  820. #_LVOMUI_EndRefresh=-198        ;(mri,flags)(a0,d0)
  821.  
  822. Macro CALLMUI
  823.         MOVEA.l _MUIBase(pc),a6
  824.         JSR     _LVO`1(a6)
  825. End Macro
  826.  
  827. Macro MUINAME
  828.         Dc.b    "muimaster.library",0
  829. End Macro
  830.  
  831. Macro OPENLIB
  832.         LEA     `1(pc),a1
  833.         MOVEQ   #0,d0
  834.         !CALLEXEC       {OpenLibrary}
  835.         MOVE.l  d0,`2
  836. End Macro
  837.  
  838. Macro CLOSELIB
  839.         MOVEA.l `1(pc),a1
  840.         !CALLEXEC       {CloseLibrary}
  841. End Macro
  842.  
  843.  
  844. NEWTYPE.MUIObject
  845.   adr.l            ;0:Address of the object
  846.   kind.w           ;4:Kind of the object
  847.   tagl.l           ;6:Address of the taglist
  848.   tagp.w           ;10:Pointer of the taglist
  849.   size.w           ;12:Size of the taglist
  850.   special.l        ;14:Special Info
  851.   spesize.w        ;18:Special Info size
  852.   spe2.l           ;20:Special Info 2 (Hook)
  853.   spe2size.w       ;24:Special Info 2 size
  854. End NEWTYPE        ;26:sizeof
  855.  
  856. #kind_nothing=-1
  857. #kind_app=0
  858. #kind_win=1
  859. #kind_menu=2
  860. #kind_gadget=3
  861. #kind_label=4
  862. #kind_other=5
  863.  
  864. Macro s
  865.   SizeOf.MUIObject\`1(a3)
  866. End Macro
  867.  
  868. Macro t
  869.   SizeOf.MUIObject\`1(a2)
  870. End Macro
  871.  
  872. Macro u
  873.   SizeOf.MUIObject\`1(a0)
  874. End Macro
  875.  
  876. NEWTYPE.SubStruct
  877.   *NextSub.SubStruct
  878.   *Name.b
  879.   pad1.l
  880.   Flags.w
  881.   *Key.b
  882.   pad2.l
  883.   MutualExclude.l
  884.   *UserData.b
  885. End NEWTYPE
  886.  
  887. NEWTYPE.ItemStruct
  888.   *_NextItem.ItemStruct
  889.   *Name.b
  890.   pad1.l
  891.   Flags.w
  892.   *Key.b
  893.   *FirstSub.SubStruct
  894.   MutualExclude.l
  895.   *UserData.b
  896. End NEWTYPE
  897.  
  898. NEWTYPE.TitleStruct
  899.   *NextTitle.TitleStruct
  900.   *Name.b
  901.   *_FirstItem.ItemStruct
  902. End NEWTYPE
  903.  
  904. NEWTYPE.GTMenuList
  905.   *_MenuList.l
  906.   *MenuLookup.TitleStruct
  907.   numitems.w
  908. End NEWTYPE
  909.  
  910. Macro gl
  911.   SizeOf.GTMenuList\`1(a2)
  912. End Macro
  913.  
  914. Macro ggl
  915.   SizeOf.GTMenuList\`1(a1)
  916. End Macro
  917.  
  918. Macro ts
  919.   SizeOf.TitleStruct\`1(a2)
  920. End Macro
  921.  
  922. Macro tts
  923.   SizeOf.TitleStruct\`1(a3)
  924. End Macro
  925.  
  926. Macro is
  927.   SizeOf.ItemStruct\`1(a0)
  928. End Macro
  929.  
  930. Macro ss
  931.   SizeOf.SubStruct\`1(a0)
  932. End Macro
  933.  
  934.  
  935.  
  936. ;************
  937. ;*** CODE ***
  938. ;************
  939.  
  940. .
  941. ._codeinit:
  942.         MOVEM.l d0-d1/a1/a6,-(a7)
  943.         LEA     muiname(pc),a1
  944.         MOVEQ   #0,d0
  945.         MOVEA.l 4,a6
  946.         JSR     _LVOOpenLibrary(a6)
  947.         MOVE.l  d0,_MUIBase
  948.         BEQ     initerr
  949.         MOVE.l  #160,d0
  950.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  951.         ALibJsr $C002
  952.         MOVE.l  d0,apptags
  953.         BEQ     initerr
  954. 'ok:    MOVE.w  #0,apptap
  955.         MOVEM.l (a7)+,d0-d1/a1/a6
  956.         RTS
  957.  
  958. ._codefinit:
  959.         MOVEM.l d0/a1/a6,-(a7)
  960.         BSR     _removeapp
  961.         MOVE.l  _MUIBase(pc),d0
  962.         BEQ     'nolib
  963.         MOVEA.l d0,a1
  964.         MOVEA.l 4,a6
  965.         JSR     _LVOCloseLibrary(a6)
  966.         CLR.l   _MUIBase
  967. 'nolib: MOVEM.l (a7)+,d0/a1/a6
  968.         RTS
  969.  
  970.  
  971. muiname:  Dc.b  "muimaster.library",0
  972.  
  973.         Even
  974.  
  975.  
  976. _setmaxtags:
  977.         MOVE.l  d0,maxt
  978.         RTS
  979. .
  980. _apptitle:
  981.         MOVEA.l apptags(pc),a1
  982.         MOVE.w  apptap(pc),d2
  983.         ADDA.w  d2,a1
  984.         MOVE.l  #MUIA_Application_Title,(a1)+
  985.         MOVE.l  -(a2),d1
  986.         ALibJsr $cf01
  987.         MOVE.l  d0,(a1)+
  988.         ADDQ.w  #8,d2
  989.         MOVE.w  d2,apptap
  990.         RTS
  991.  
  992. _appver:
  993.         MOVEA.l apptags(pc),a1
  994.         MOVE.w  apptap(pc),d2
  995.         ADDA.w  d2,a1
  996.         MOVE.l  #MUIA_Application_Version,(a1)+
  997.         MOVE.l  -(a2),d1
  998.         ALibJsr $cf01
  999.         MOVE.l  d0,(a1)+
  1000.         ADDQ.w  #8,d2
  1001.         MOVE.w  d2,apptap
  1002.         RTS
  1003.  
  1004. _appcr:
  1005.         MOVEA.l apptags(pc),a1
  1006.         MOVE.w  apptap(pc),d2
  1007.         ADDA.w  d2,a1
  1008.         MOVE.l  #MUIA_Application_Copyright,(a1)+
  1009.         MOVE.l  -(a2),d1
  1010.         ALibJsr $cf01
  1011.         MOVE.l  d0,(a1)+
  1012.         ADDQ.w  #8,d2
  1013.         MOVE.w  d2,apptap
  1014.         RTS
  1015.  
  1016. _appauthor:
  1017.         MOVEA.l apptags(pc),a1
  1018.         MOVE.w  apptap(pc),d2
  1019.         ADDA.w  d2,a1
  1020.         MOVE.l  #MUIA_Application_Author,(a1)+
  1021.         MOVE.l  -(a2),d1
  1022.         ALibJsr $cf01
  1023.         MOVE.l  d0,(a1)+
  1024.         ADDQ.w  #8,d2
  1025.         MOVE.w  d2,apptap
  1026.         RTS
  1027.  
  1028. _appdesc:
  1029.         MOVEA.l apptags(pc),a1
  1030.         MOVE.w  apptap(pc),d2
  1031.         ADDA.w  d2,a1
  1032.         MOVE.l  #MUIA_Application_Description,(a1)+
  1033.         MOVE.l  -(a2),d1
  1034.         ALibJsr $cf01
  1035.         MOVE.l  d0,(a1)+
  1036.         ADDQ.w  #8,d2
  1037.         MOVE.w  d2,apptap
  1038.         RTS
  1039.  
  1040. _appbase:
  1041.         MOVEA.l apptags(pc),a1
  1042.         MOVE.w  apptap(pc),d2
  1043.         ADDA.w  d2,a1
  1044.         MOVE.l  #MUIA_Application_Base,(a1)+
  1045.         MOVE.l  -(a2),d1
  1046.         ALibJsr $cf01
  1047.         MOVE.l  d0,(a1)+
  1048.         ADDQ.w  #8,d2
  1049.         MOVE.w  d2,apptap
  1050.         RTS
  1051.  
  1052. _apploc:
  1053.         MOVE.l  #appstruct,d0
  1054.         RTS
  1055.  
  1056. _appobj:
  1057.         MOVE.l  apptags(pc),!s{tagl}
  1058.         MOVE.w  apptap(pc),!s{tagp}
  1059.         MOVE.l  appaddr(pc),!s{adr}
  1060.         MOVE.w  #kind_app,!s{kind}
  1061.         MOVE.l  #160,!s{size}
  1062.         RTS
  1063.  
  1064.  
  1065. _appwin:                        ;a3=MUIObject=>Window
  1066.         TST.l   !s{adr}
  1067.         BEQ     'nowin
  1068.         MOVEQ   #0,d0
  1069.         CMP.w   #kind_win,!s{kind}
  1070.         BNE     'nowin
  1071.         MOVEA.l apptags(pc),a1
  1072.         MOVE.w  apptap(pc),d0
  1073.         ADDA.w  d0,a1
  1074.         MOVE.l  #SubWindow,(a1)+
  1075.         MOVE.l  !s{adr},(a1)+
  1076.         ADDQ.w  #8,d0
  1077.         MOVE.w  d0,apptap
  1078.         MOVE.l  #-1,d0
  1079. 'nowin: RTS
  1080.  
  1081. ._addapptags:
  1082.         MOVEA.l apptags(pc),a1
  1083.         MOVE.w  apptap(pc),d0
  1084.         ADDA.w  d0,a1
  1085.         SUBQ    #1,d7
  1086. 'loop:  MOVE.l  -(a2),(a1)+
  1087.         ADDQ.w  #4,d0
  1088.         DBF     d7,'loop
  1089.         MOVE.w  d0,apptap
  1090.         RTS
  1091.  
  1092. _addapptagsa:                   ;d0=&taglist
  1093.         MOVEA.l d0,a0
  1094.         BEQ     'notags
  1095.         MOVEA.l apptags(pc),a1
  1096.         MOVE.l  a1,d0
  1097.         MOVE.w  apptap(pc),d1
  1098.         ADDA.w  d1,a1
  1099. 'loop:  MOVE.l  (a0)+,(a1)+
  1100.         BNE     'loop
  1101.         SUBA.l  d0,a1
  1102.         MOVE.w  d0,apptap
  1103. 'notags:RTS
  1104.  
  1105. ._createapp:
  1106.         LEA     appclass(pc),a0
  1107.         MOVE.l  apptags(pc),d0
  1108.         BEQ     'noapp
  1109.         MOVEA.l d0,a1
  1110.         !CALLMUI        {MUI_NewObjectA}
  1111.         MOVE.l  d0,appaddr
  1112.         BEQ     'noapp
  1113.         MOVE.l  #-1,d0
  1114. 'noapp: RTS
  1115.  
  1116. ._removeapp:
  1117.         MOVE.l  appaddr(pc),d0
  1118.         BEQ     'noapp
  1119.         MOVEA.l d0,a0
  1120.         !CALLMUI        {MUI_DisposeObject}
  1121.         CLR.l   appaddr
  1122. 'noapp: RTS
  1123.  
  1124.  
  1125.  
  1126. .
  1127. _createwin2:
  1128.         MOVEQ   #0,d2
  1129. _createwin1:
  1130.         SUBA.l  a0,a0
  1131. ._createwin:                    ;d1=title$ d2=id$ a0=MUIObject# (WindowsContents)
  1132.         TST.l   6(a3)
  1133.         BEQ     'notl
  1134.         MOVEA.l 6(a3),a1
  1135.         MOVE.w  10(a3),d6
  1136.         ADDA.w  d6,a1
  1137.         MOVE.l  #MUIA_Window_Title,(a1)+
  1138.         MOVE.l  d1,d0
  1139.         MOVE.l  -4(a2),d1
  1140.         ALibJsr $cf01
  1141.         MOVE.l  d0,(a1)+
  1142.         ADDQ.w  #8,d6
  1143.         TST.l   d2
  1144.         BEQ     'noid
  1145.         MOVE.l  #MUIA_Window_ID,(a1)+
  1146.         MOVE.l  a0,-(a7)
  1147.         MOVE.l  d2,a0
  1148.         MOVE.l  (a0),d2
  1149.         MOVE.l  d2,(a1)+
  1150.         MOVEA.l (a7)+,a0
  1151.         ADDQ.w  #8,d6
  1152. 'noid:  TST.l   (a0)
  1153.         BEQ     'noobj
  1154.         MOVE.l  #WindowContents,(a1)+
  1155.         MOVE.l  (a0),(a1)+
  1156.         ADDQ.w  #8,d6
  1157. 'noobj: MOVEA.l !s{tagl},a1
  1158.         MOVE.w  d6,10(a3)
  1159.         MOVEQ   #0,d0
  1160.         LEA     winclass(pc),a0
  1161.         !CALLMUI        {MUI_NewObjectA}
  1162.         MOVE.l  d0,(a3)
  1163.         BEQ     'nowin
  1164.         MOVE.w  #kind_win,!s{kind}
  1165.         MOVE.l  #-1,d0
  1166.         BRA     'nowin
  1167. 'notl:
  1168.         TST.l   (a0)
  1169.         BEQ     'nowin
  1170.         MOVEM.l d1-d2/a2-a3,-(a7)
  1171.         MOVE.l  maxt(pc),d0
  1172.         LSL.l   #2,d0
  1173.         MOVE.w  d0,!s{size}
  1174.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1175.         ALibJsr $C002
  1176.         MOVEM.l (a7)+,d1-d2/a2-a3
  1177.         MOVE.l  d0,6(a3)
  1178.         BEQ     'nowin
  1179.         MOVEA.l d0,a1
  1180.         MOVE.l  #MUIA_Window_Title,(a1)+
  1181.         MOVE.l  d1,d0
  1182.         MOVE.l  -4(a2),d1
  1183.         ALibJsr $cf01
  1184.         MOVE.l  d0,(a1)+
  1185.         MOVE.l  #MUIA_Window_ID,(a1)+
  1186.         MOVE.l  a0,-(a7)
  1187.         MOVE.l  d2,a0
  1188.         MOVE.l  (a0),d2
  1189.         MOVE.l  d2,(a1)+
  1190.         MOVEA.l (a7)+,a0
  1191.         MOVE.l  #WindowContents,(a1)+
  1192.         MOVE.l  (a0),(a1)+
  1193.         MOVE.w  #24,10(a3)
  1194.         MOVEA.l 6(a3),a1
  1195.         LEA     winclass(pc),a0
  1196.         !CALLMUI        {MUI_NewObjectA}
  1197.         MOVE.l  d0,(a3)
  1198.         BEQ     'nowin
  1199.         MOVE.w  #kind_win,4(a3)
  1200.         MOVE.l  #-1,d0
  1201. 'nowin:
  1202.         RTS
  1203.  
  1204. ._openwin:
  1205.         MOVE.l  a6,_IntuiBase
  1206.         MOVEQ   #0,d0
  1207.         CMP.w   #kind_win,4(a3)
  1208.         BNE     'nowin
  1209.         MOVE.l  (a3),d0
  1210.         BEQ     'nowin
  1211.         MOVE.l  #MUIA_Window_Open,d1
  1212.         MOVEQ   #1,d2
  1213.         BSR     _set
  1214.         MOVE.l  #-1,d0
  1215. 'nowin: RTS
  1216.  
  1217. ._closewin:
  1218.         MOVE.l  a6,_IntuiBase
  1219.         MOVEQ   #0,d0
  1220.         CMP.w   #kind_win,4(a3)
  1221.         BNE     'nowin
  1222.         MOVE.l  (a3),d0
  1223.         BEQ     'nowin
  1224.         MOVE.l  #MUIA_Window_Open,d1
  1225.         MOVEQ   #0,d2
  1226.         BSR     _set
  1227.         MOVE.l  #-1,d0
  1228. 'nowin: RTS
  1229.  
  1230. .
  1231. ._createmenu: ;a2=gtml a3=mo d2=f
  1232.         BSR     _freeobj
  1233.         MOVE.w  !gl{numitems},d0
  1234.         ADDQ.w  #1,d0
  1235.         MULU.w  #20,d0
  1236.         MOVE.w  d0,!s{spesize}
  1237.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1238.         ALibJsr $C002
  1239.         MOVE.l  d0,!s{special}
  1240.         BEQ     'noobj
  1241.         MOVEA.l d0,a1
  1242.         MOVEA.l !gl{MenuLookup},a2
  1243. 'tit:   MOVE.b  #1,(a1)
  1244.         MOVE.l  !ts{Name},2(a1)
  1245.         ADDA.l  #20,a1
  1246.         TST.l   !ts{_FirstItem}
  1247.         BEQ     'nxtti
  1248.         MOVEA.l !ts{_FirstItem},a0
  1249. 'ite:   MOVE.b  #2,(a1)
  1250.         MOVE.l  !is{Name},2(a1)
  1251.         MOVE.l  !is{Key},6(a1)
  1252.         MOVE.w  !is{Flags},10(a1)
  1253.         MOVE.l  !is{MutualExclude},12(a1)
  1254.         MOVE.l  !is{UserData},16(a1)
  1255.         ADDA.l  #20,a1
  1256.         TST.l   !is{FirstSub}
  1257.         BEQ     'nxtit
  1258.         MOVE.l  a0,-(a7)
  1259.         MOVEA.l !is{FirstSub},a0
  1260. 'su:    MOVE.b  #3,(a1)
  1261.         MOVE.l  !ss{Name},2(a1)
  1262.         MOVE.l  !ss{Key},6(a1)
  1263.         MOVE.w  !ss{Flags},10(a1)
  1264.         MOVE.l  !ss{MutualExclude},12(a1)
  1265.         MOVE.l  !ss{UserData},16(a1)
  1266.         ADDA.l  #20,a1
  1267.         TST.l   !ss{NextSub}
  1268.         BEQ     'nxti
  1269.         MOVEA.l !ss{NextSub},a0
  1270.         BRA     'su
  1271. 'nxti:  MOVEA.l (a7)+,a0
  1272. 'nxtit: TST.l   !is{_NextItem}
  1273.         BEQ     'nxtti
  1274.         MOVEA.l !is{_NextItem},a0
  1275.         BRA     'ite
  1276. 'nxtti: MOVE.l  !ts{NextTitle},d0
  1277.         BEQ     'fin
  1278.         MOVEA.l d0,a2
  1279.         BRA     'tit
  1280. 'fin:   MOVE.b  #0,(a1)
  1281.         LEA     args(pc),a0
  1282.         MOVE.l  a0,d1
  1283.         MOVE.l  !s{special},(a0)+
  1284.         MOVE.l  d2,(a0)+
  1285.         MOVE.l  #0,(a0)+
  1286.         MOVEA.l d1,a0
  1287.         MOVE.l  #MUIO_MenustripNM,d0
  1288.         !CALLMUI        {MUI_MakeObjectA}
  1289.         MOVE.l  d0,!s{adr}
  1290.         BEQ     'noobj
  1291.         CLR.l   !s{tagl}
  1292.         CLR.w   !s{size}
  1293.         MOVE.w  #kind_menu,!s{kind}
  1294.         MOVE.l  #-1,d0
  1295. 'noobj:
  1296.         RTS
  1297.  
  1298.  
  1299. _createmenud: ;a1=gtml a3=mo d2=f (a2)=ud
  1300.         BSR     _freeobj
  1301.         MOVE.w  !ggl{numitems},d0
  1302.         ADDQ.w  #1,d0
  1303.         MULU.w  #20,d0
  1304.         MOVE.w  d0,!s{spesize}
  1305.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1306.         ALibJsr $C002
  1307.         MOVE.l  d0,!s{special}
  1308.         BEQ     'noobj
  1309.         MOVE.l  a3,-(a7)
  1310.         MOVEA.l !ggl{MenuLookup},a3
  1311.         MOVEA.l d0,a1
  1312. 'tit:   MOVE.b  #1,(a1)
  1313.         MOVE.l  !tts{Name},2(a1)
  1314.         MOVE.l  -(a2),16(a1)
  1315.         ADDA.l  #20,a1
  1316.         TST.l   !tts{_FirstItem}
  1317.         BEQ     'nxtti
  1318.         MOVEA.l !tts{_FirstItem},a0
  1319. 'ite:   MOVE.b  #2,(a1)
  1320.         MOVE.l  !is{Name},2(a1)
  1321.         MOVE.l  !is{Key},6(a1)
  1322.         MOVE.w  !is{Flags},10(a1)
  1323.         MOVE.l  !is{MutualExclude},12(a1)
  1324.         MOVE.l  !is{UserData},16(a1)
  1325.         ADDA.l  #20,a1
  1326.         TST.l   !is{FirstSub}
  1327.         BEQ     'nxtit
  1328.         MOVE.l  a0,-(a7)
  1329.         MOVEA.l !is{FirstSub},a0
  1330. 'su:    MOVE.b  #3,(a1)
  1331.         MOVE.l  !ss{Name},2(a1)
  1332.         MOVE.l  !ss{Key},6(a1)
  1333.         MOVE.w  !ss{Flags},10(a1)
  1334.         MOVE.l  !ss{MutualExclude},12(a1)
  1335.         MOVE.l  !ss{UserData},16(a1)
  1336.         ADDA.l  #20,a1
  1337.         TST.l   !ss{NextSub}
  1338.         BEQ     'nxti
  1339.         MOVEA.l !ss{NextSub},a0
  1340.         BRA     'su
  1341. 'nxti:  MOVEA.l (a7)+,a0
  1342. 'nxtit: TST.l   !is{_NextItem}
  1343.         BEQ     'nxtti
  1344.         MOVEA.l !is{_NextItem},a0
  1345.         BRA     'ite
  1346. 'nxtti: MOVE.l  !tts{NextTitle},d0
  1347.         BEQ     'fin
  1348.         MOVEA.l d0,a3
  1349.         BRA     'tit
  1350. 'fin:   MOVEA.l (a7)+,a3
  1351.         MOVE.b  #0,(a1)
  1352.         LEA     args(pc),a0
  1353.         MOVE.l  a0,d1
  1354.         MOVE.l  !s{special},(a0)+
  1355.         MOVE.l  d2,(a0)+
  1356.         MOVE.l  #0,(a0)+
  1357.         MOVEA.l d1,a0
  1358.         MOVE.l  #MUIO_MenustripNM,d0
  1359.         !CALLMUI        {MUI_MakeObjectA}
  1360.         MOVE.l  d0,!s{adr}
  1361.         BEQ     'noobj
  1362.         CLR.l   !s{tagl}
  1363.         CLR.w   !s{size}
  1364.         MOVE.w  #kind_menu,!s{kind}
  1365.         MOVE.l  #-1,d0
  1366. 'noobj:
  1367.         RTS
  1368.  
  1369. ._setmenu: ;a3=win a2=menu
  1370.         TST.l   !s{adr}
  1371.         BNE     'noobj
  1372.         TST.l   !t{adr}
  1373.         BEQ     'noobj
  1374.         CMP.w   #kind_menu,!t{kind}
  1375.         BNE     'noobj
  1376.         MOVEA.l !s{tagl},a1
  1377.         TST.l   !s{tagl}
  1378.         BNE     'tlok
  1379.         MOVE.l  maxt(pc),d0
  1380.         LSL.l   #2,d0
  1381.         MOVE.w  d0,!s{size}
  1382.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1383.         ALibJsr $C002
  1384.         MOVE.l  d0,!s{tagl}
  1385.         BEQ     'noobj
  1386.         MOVEA.l d0,a1
  1387.         CLR.w   !s{tagp}
  1388. 'tlok:  MOVE.w  !s{tagp},d6
  1389.         ADDA.w  d6,a1
  1390.         MOVE.l  #MUIA_Window_Menustrip,(a1)+
  1391.         MOVE.l  !t{adr},(a1)+
  1392.         ADD.w   #8,d6
  1393.         MOVE.w  d6,!s{tagp}
  1394. 'noobj: RTS
  1395. .
  1396. ._objloc:
  1397.         MOVE.l  !s{adr},d0
  1398.         RTS
  1399.  
  1400. .
  1401. ._request:  ;(win,flags,&title$,&gadget$,&format$,params)(a3,d1,d2,d3,d4,-12(a2))
  1402.         MOVEQ   #0,d0
  1403.         TST.l   appaddr
  1404.         BEQ     'noobj
  1405.         TST.l   !s{adr}
  1406.         BEQ     'noobj
  1407.         CMP.w   #kind_win,!s{kind}
  1408.         BNE     'noobj
  1409.         MOVE.l  d1,d5
  1410.         MOVE.l  d2,d0
  1411.         MOVE.l  -(a2),d1
  1412.         ALibJsr $cf01
  1413.         MOVEA.l d0,a0
  1414.         MOVE.l  d0,s0
  1415.         MOVE.l  d3,d0
  1416.         MOVE.l  -(a2),d1
  1417.         ALibJsr $cf01
  1418.         MOVEA.l d0,a1
  1419.         MOVE.l  d0,s1
  1420.         MOVE.l  d4,d0
  1421.         MOVE.l  -(a2),d1
  1422.         ALibJsr $cf01
  1423.         MOVE.l  d0,s2
  1424.         MOVE.l  !s{adr},d1
  1425.         MOVE.l  d5,d2
  1426.         SUBA.l  a3,a3
  1427.         TST.w   d7
  1428.         BLE     'noparams
  1429.         LEA     args(pc),a3
  1430.         MOVE.l  a3,d6
  1431.         SUBQ    #1,d7
  1432. 'loop:  MOVE.l  -(a2),(a3)+
  1433.         DBF     d7,'loop
  1434.         MOVE.l  #0,(a3)+
  1435.         MOVEA.l d6,a3
  1436. 'noparams:
  1437.         MOVEA.l s2,a2
  1438.         MOVE.l  appaddr(pc),d0
  1439.         !CALLMUI        {MUI_RequestA}    ;(app,win,flags,title,gadgets,format,params)(d0,d1,d2,a0,a1,a2,a3)
  1440.         MOVE.l  d0,d5
  1441.         MOVE.l  s0,d0
  1442.         ALibJsr $cf02
  1443.         MOVE.l  s1,d0
  1444.         ALibJsr $cf02
  1445.         MOVE.l  s2,d0
  1446.         ALibJsr $cf02
  1447.         MOVE.l  d5,d0
  1448. 'noobj: RTS
  1449.  
  1450. .
  1451. ._addobjtags:
  1452.         TST.l   6(a3)
  1453.         BEQ     'notl
  1454.         MOVEA.l 6(a3),a1
  1455.         MOVE.w  10(a3),d0
  1456.         ADDA.w  d0,a1
  1457.         SUBQ    #1,d7
  1458. 'loop:  MOVE.l  -(a2),(a1)+
  1459.         ADDQ.w  #4,d0
  1460.         DBF     d7,'loop
  1461.         MOVE.w  d0,10(a3)
  1462.         BRA     'nomem
  1463. 'notl:  MOVE.l  maxt(pc),d0
  1464.         LSL     #2,d0
  1465.         MOVE.w  d0,!s{size}
  1466.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1467.         ALibJsr $C002
  1468.         MOVE.l  d0,6(a3)
  1469.         BEQ     'nomem
  1470.         MOVE.w  #0,10(a3)
  1471.         MOVEA.l d0,a1
  1472.         MOVEQ   #0,d0
  1473.         SUBQ    #1,d7
  1474. 'loop1: MOVE.l  -(a2),(a1)+
  1475.         ADDQ.w  #4,d0
  1476.         DBF     d7,'loop1
  1477.         MOVE.w  d0,10(a3)
  1478. 'nomem: RTS
  1479.  
  1480. _addobjtagsa:
  1481.         TST.l   !s{tagl}
  1482.         BEQ     'notl
  1483.         MOVEA.l !s{tagl},a1
  1484.         ADDA.w  d0,a1
  1485.         MOVEA.l d1,a0
  1486.         MOVEA.l (a0),a0
  1487. 'loop:  MOVE.l  (a0)+,(a1)+
  1488.         BNE     'loop
  1489.         MOVE.l  !s{tagl},d0
  1490.         SUBA.l  d0,a1
  1491.         MOVE.w  d0,!s{tagp}
  1492.         BRA     'nomem
  1493. 'notl:  MOVE.l  maxt(pc),d0
  1494.         LSL     #2,d0
  1495.         MOVE.w  d0,!s{size}
  1496.         MOVE.l  d1,-(a7)
  1497.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1498.         ALibJsr $C002
  1499.         MOVE.l  (a7)+,d1
  1500.         MOVE.l  d0,!s{tagl}
  1501.         BEQ     'nomem
  1502.         MOVEA.l d0,a1
  1503.         MOVEA.l d1,a0
  1504.         MOVEA.l (a0),a0
  1505. 'loop1: MOVE.l  (a0)+,(a1)+
  1506.         BNE     'loop1
  1507.         MOVE.l  !s{tagl},d0
  1508.         SUBA.l  d0,a1
  1509.         MOVE.w  !s{tagp},d1
  1510.         ADD.w   d0,d1
  1511.         MOVE.w  d1,!s{tagp}
  1512. 'nomem: RTS
  1513.  
  1514.  
  1515. .
  1516. ._muinewobj:
  1517.         MOVEA.l d1,a0
  1518.         MOVEA.l !s{tagl},a1
  1519.         TST.l   !s{tagl}
  1520.         BNE     'tlok
  1521.         MOVE.l  maxt(pc),d0
  1522.         LSL     #2,d0
  1523.         MOVE.w  d0,!s{size}
  1524.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1525.         ALibJsr $C002
  1526.         MOVE.l  d0,!s{tagl}
  1527.         BEQ     'err
  1528.         MOVEA.l d0,a1
  1529.         CLR.w   !s{tagp}
  1530. 'tlok:  MOVE.w  !s{tagp},d6
  1531.         ADDA.w  d6,a1
  1532.         SUBQ    #1,d7
  1533.         TST.l   -(a2)
  1534. 'loop:  MOVE.l  -(a2),(a1)+
  1535.         ADDQ.w  #4,d6
  1536.         DBF     d7,'loop
  1537.         MOVE.w  d6,!s{tagp}
  1538.         MOVEA.l !s{tagl},a1
  1539.         !CALLMUI        {MUI_NewObjectA}
  1540.         MOVE.l  d0,!s{adr}
  1541.         BEQ     'err
  1542.         MOVE.l  #-1,d0
  1543. 'err:   RTS
  1544.  
  1545.  
  1546. _muinewobja:
  1547.         MOVEA.l d1,a0
  1548.         MOVEA.l !s{tagl},a1
  1549.         TST.l   !s{tagl}
  1550.         BNE     'tlok
  1551.         MOVE.l  maxt(pc),d0
  1552.         LSL     #2,d0
  1553.         MOVE.w  d0,!s{size}
  1554.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1555.         ALibJsr $C002
  1556.         MOVE.l  d0,!s{tagl}
  1557.         BEQ     'err
  1558.         MOVEA.l d0,a1
  1559.         CLR.w   !s{tagp}
  1560. 'tlok:  MOVE.w  !s{tagp},d6
  1561.         ADDA.w  d6,a1
  1562.         MOVEA.l d2,a2
  1563. 'loop:  MOVE.l  (a2)+,(a1)+
  1564.         BNE     'loop
  1565.         MOVE.l  !s{tagl},d6
  1566.         SUBA.l  d6,a1
  1567.         MOVE.w  d6,!s{tagp}
  1568.         MOVEA.l !s{tagl},a1
  1569.         !CALLMUI        {MUI_NewObjectA}
  1570.         MOVE.l  d0,!s{adr}
  1571.         BEQ     'err
  1572.         MOVE.l  #-1,d0
  1573. 'err:   RTS
  1574.  
  1575. ._muimakeobj:
  1576.         MOVE.l  d1,-(a7)
  1577.         MOVEA.l !s{tagl},a1
  1578.         TST.l   !s{tagl}
  1579.         BNE     'tlok
  1580.         MOVE.l  maxt(pc),d0
  1581.         LSL     #2,d0
  1582.         MOVE.w  d0,!s{size}
  1583.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1584.         ALibJsr $C002
  1585.         MOVE.l  d0,!s{tagl}
  1586.         BEQ     'err
  1587.         MOVEA.l d0,a1
  1588.         CLR.w   !s{tagp}
  1589. 'tlok:  MOVE.w  !s{tagp},d6
  1590.         ADDA.w  d6,a1
  1591.         SUBQ    #1,d7
  1592. 'loop:  MOVE.l  -(a2),(a1)+
  1593.         ADDQ.w  #4,d6
  1594.         DBF     d7,'loop
  1595.         MOVE.w  d6,!s{tagp}
  1596.         MOVE.l  (a7)+,d0
  1597.         MOVEA.l !s{tagl},a0
  1598.         !CALLMUI        {MUI_MakeObjectA}
  1599.         MOVE.l  d0,!s{adr}
  1600.         BEQ     'err
  1601.         MOVE.l  #-1,d0
  1602. 'err:   RTS
  1603.  
  1604.  
  1605.  
  1606. _muimakeobja:
  1607.         MOVE.l  d1,-(a7)
  1608.         MOVEA.l !s{tagl},a1
  1609.         TST.l   !s{tagl}
  1610.         BNE     'tlok
  1611.         MOVE.l  maxt(pc),d0
  1612.         LSL     #2,d0
  1613.         MOVE.w  d0,!s{size}
  1614.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1615.         ALibJsr $C002
  1616.         MOVE.l  d0,!s{tagl}
  1617.         BEQ     'err
  1618.         MOVEA.l d0,a1
  1619.         CLR.w   !s{tagp}
  1620. 'tlok:  MOVE.w  !s{tagp},d6
  1621.         ADDA.w  d6,a1
  1622.         MOVEA.l d2,a2
  1623. 'loop:  MOVE.l  (a2)+,(a1)+
  1624.         BNE     'loop
  1625.         MOVE.l  !s{tagl},d6
  1626.         SUBA.l  d6,a1
  1627.         MOVE.w  d6,!s{tagp}
  1628.         MOVE.l  (a7)+,d0
  1629.         MOVEA.l !s{tagl},a0
  1630.         !CALLMUI        {MUI_MakeObjectA}
  1631.         MOVE.l  d0,!s{adr}
  1632.         BEQ     'err
  1633.         MOVE.l  #-1,d0
  1634. 'err:   RTS
  1635.  
  1636.  
  1637. .
  1638. ._muimacros:
  1639.  
  1640.  
  1641. _hvspace:
  1642.         LEA     rectangleclass(pc),a0
  1643.         SUBA.l  a1,a1
  1644.         !CALLMUI        {MUI_NewObjectA}
  1645.         MOVE.l  d0,!s{adr}
  1646.         BEQ     'noobj
  1647.         CLR.l   !s{tagl}
  1648.         CLR.l   !s{size}
  1649.         MOVE.w  #kind_other,!s{kind}
  1650.         MOVE.l  #-1,d0
  1651. 'noobj: RTS
  1652.  
  1653.  
  1654. _hspace:
  1655.         MOVE.l  #MUIO_HSpace,d0
  1656.         MOVE.l  d1,a0
  1657.         !CALLMUI        {MUI_MakeObjectA}
  1658.         MOVE.l  d0,!s{adr}
  1659.         BEQ     'noobj
  1660.         CLR.l   !s{tagl}
  1661.         CLR.w   !s{size}
  1662.         MOVE.w  #kind_other,!s{kind}
  1663.         MOVE.l  #-1,d0
  1664. 'noobj: RTS
  1665.  
  1666. _vspace:
  1667.         MOVE.l  #MUIO_VSpace,d0
  1668.         MOVE.l  d1,a0
  1669.         !CALLMUI        {MUI_MakeObjectA}
  1670.         MOVE.l  d0,!s{adr}
  1671.         BEQ     'noobj
  1672.         CLR.l   !s{tagl}
  1673.         CLR.w   !s{size}
  1674.         MOVE.w  #kind_other,!s{kind}
  1675.         MOVE.l  #-1,d0
  1676. 'noobj: RTS
  1677.  
  1678.  
  1679. _string:
  1680.         MOVE.l  d1,d5
  1681.         MOVEA.l !s{tagl},a1
  1682.         TST.l   !s{tagl}
  1683.         BNE     'tlok
  1684.         MOVE.l  maxt(pc),d0
  1685.         LSL     #2,d0
  1686.         MOVE.w  d0,!s{size}
  1687.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1688.         ALibJsr $C002
  1689.         MOVE.l  d0,!s{tagl}
  1690.         BEQ     'noobj
  1691.         MOVEA.l d0,a1
  1692.         CLR.w   !s{tagp}
  1693. 'tlok:  MOVE.w  !s{tagp},d6
  1694.         ADDA.w  d6,a1
  1695.         MOVE.l  #MUIA_Frame,(a1)+
  1696.         MOVE.l  #MUIV_Frame_String,(a1)+
  1697.         MOVE.l  #MUIA_String_MaxLen,(a1)+
  1698.         MOVE.l  d2,(a1)+
  1699.         MOVE.l  #MUIA_String_Contents,(a1)+
  1700.         MOVE.l  d5,(a1)+
  1701.         ADD.w   #24,d6
  1702.         MOVE.w  d6,!s{tagp}
  1703.         LEA     stringclass(pc),a0
  1704.         MOVEA.l !s{tagl},a1
  1705.         !CALLMUI        {MUI_NewObjectA}
  1706.         MOVE.l  d0,!s{adr}
  1707.         BEQ     'noobj
  1708.         MOVE.w  #kind_gadget,!s{kind}
  1709.         MOVE.l  #-1,d0
  1710. 'noobj: RTS
  1711.  
  1712. _keystring:
  1713.         MOVE.l  d1,d5
  1714.         MOVEA.l d3,a0
  1715.         MOVEQ   #0,d3
  1716.         MOVE.b  (a0),d3
  1717.         MOVEA.l !s{tagl},a1
  1718.         TST.l   !s{tagl}
  1719.         BNE     'tlok
  1720.         MOVE.l  maxt(pc),d0
  1721.         LSL     #2,d0
  1722.         MOVE.w  d0,!s{size}
  1723.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1724.         ALibJsr $C002
  1725.         MOVE.l  d0,!s{tagl}
  1726.         BEQ     'noobj
  1727.         MOVEA.l d0,a1
  1728.         CLR.w   !s{tagp}
  1729. 'tlok:  MOVE.w  !s{tagp},d6
  1730.         ADDA.w  d6,a1
  1731.         MOVE.l  #MUIA_Frame,(a1)+
  1732.         MOVE.l  #MUIV_Frame_String,(a1)+
  1733.         MOVE.l  #MUIA_ControlChar,(a1)+
  1734.         MOVE.l  d3,(a1)+
  1735.         MOVE.l  #MUIA_String_MaxLen,(a1)+
  1736.         MOVE.l  d2,(a1)+
  1737.         MOVE.l  #MUIA_String_Contents,(a1)+
  1738.         MOVE.l  d5,(a1)+
  1739.         ADD.w   #32,d6
  1740.         MOVE.w  d6,!s{tagp}
  1741.         LEA     stringclass(pc),a0
  1742.         MOVEA.l !s{tagl},a1
  1743.         !CALLMUI        {MUI_NewObjectA}
  1744.         MOVE.l  d0,!s{adr}
  1745.         BEQ     'noobj
  1746.         MOVE.w  #kind_gadget,!s{kind}
  1747.         MOVE.l  #-1,d0
  1748. 'noobj: RTS
  1749.  
  1750. _checkmark:
  1751.         MOVE.l  d1,d5
  1752.         MOVEA.l !s{tagl},a1
  1753.         TST.l   !s{tagl}
  1754.         BNE     'tlok
  1755.         MOVE.l  maxt(pc),d0
  1756.         LSL     #2,d0
  1757.         MOVE.w  d0,!s{size}
  1758.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1759.         ALibJsr $C002
  1760.         MOVE.l  d0,!s{tagl}
  1761.         BEQ     'noobj
  1762.         MOVEA.l d0,a1
  1763.         CLR.w   !s{tagp}
  1764. 'tlok:  MOVE.w  !s{tagp},d6
  1765.         ADDA.w  d6,a1
  1766.         MOVE.l  #MUIA_Frame,(a1)+
  1767.         MOVE.l  #MUIV_Frame_ImageButton,(a1)+
  1768.         MOVE.l  #MUIA_InputMode,(a1)+
  1769.         MOVE.l  #MUIV_InputMode_Toggle,(a1)+
  1770.         MOVE.l  #MUIA_Image_Spec,(a1)+
  1771.         MOVE.l  #MUII_CheckMark,(a1)+
  1772.         MOVE.l  #MUIA_Image_FreeVert,(a1)+
  1773.         MOVE.l  #1,(a1)+
  1774.         MOVE.l  #MUIA_Selected,(a1)+
  1775.         MOVE.l  d5,(a1)+
  1776.         MOVE.l  #MUIA_Background,(a1)+
  1777.         MOVE.l  #MUII_ButtonBack,(a1)+
  1778.         MOVE.l  #MUIA_ShowSelState,(a1)+
  1779.         MOVE.l  #0,(a1)+
  1780.         ADD.w   #56,d6
  1781.         MOVE.w  d6,!s{tagp}
  1782.         LEA     imageclass(pc),a0
  1783.         MOVEA.l !s{tagl},a1
  1784.         !CALLMUI        {MUI_NewObjectA}
  1785.         MOVE.l  d0,!s{adr}
  1786.         BEQ     'noobj
  1787.         MOVE.w  #kind_gadget,!s{kind}
  1788.         MOVE.l  #-1,d0
  1789. 'noobj: RTS
  1790.  
  1791. _keycheckmark:
  1792.         MOVE.l  d1,d5
  1793.         MOVEA.l d2,a0
  1794.         MOVEQ   #0,d2
  1795.         MOVE.b  (a0),d2
  1796.         MOVEA.l !s{tagl},a1
  1797.         TST.l   !s{tagl}
  1798.         BNE     'tlok
  1799.         MOVE.l  maxt(pc),d0
  1800.         LSL     #2,d0
  1801.         MOVE.w  d0,!s{size}
  1802.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1803.         ALibJsr $C002
  1804.         MOVE.l  d0,!s{tagl}
  1805.         BEQ     'noobj
  1806.         MOVEA.l d0,a1
  1807.         CLR.w   !s{tagp}
  1808. 'tlok:  MOVE.w  !s{tagp},d6
  1809.         ADDA.w  d6,a1
  1810.         MOVE.l  #MUIA_Frame,(a1)+
  1811.         MOVE.l  #MUIV_Frame_ImageButton,(a1)+
  1812.         MOVE.l  #MUIA_InputMode,(a1)+
  1813.         MOVE.l  #MUIV_InputMode_Toggle,(a1)+
  1814.         MOVE.l  #MUIA_Image_Spec,(a1)+
  1815.         MOVE.l  #MUII_CheckMark,(a1)+
  1816.         MOVE.l  #MUIA_Image_FreeVert,(a1)+
  1817.         MOVE.l  #1,(a1)+
  1818.         MOVE.l  #MUIA_Selected,(a1)+
  1819.         MOVE.l  d5,(a1)+
  1820.         MOVE.l  #MUIA_Background,(a1)+
  1821.         MOVE.l  #MUII_ButtonBack,(a1)+
  1822.         MOVE.l  #MUIA_ShowSelState,(a1)+
  1823.         MOVE.l  #0,(a1)+
  1824.         MOVE.l  #MUIA_ControlChar,(a1)+
  1825.         MOVE.l  d2,(a1)+
  1826.         ADD.w   #64,d6
  1827.         MOVE.w  d6,!s{tagp}
  1828.         LEA     imageclass(pc),a0
  1829.         MOVEA.l !s{tagl},a1
  1830.         !CALLMUI        {MUI_NewObjectA}
  1831.         MOVE.l  d0,!s{adr}
  1832.         BEQ     'noobj
  1833.         MOVE.w  #kind_gadget,!s{kind}
  1834.         MOVE.l  #-1,d0
  1835. 'noobj: RTS
  1836.  
  1837.  
  1838. _simplebutton:
  1839.         MOVE.l  d1,str
  1840.         BSR     _freeobj
  1841.         LEA     str(pc),a0
  1842.         MOVE.l  #MUIO_Button,d0
  1843.         !CALLMUI        {MUI_MakeObjectA}
  1844.         MOVE.l  d0,!s{adr}
  1845.         BEQ     'noobj
  1846.         CLR.l   !s{tagl}
  1847.         CLR.w   !s{size}
  1848.         MOVE.w  #kind_gadget,!s{kind}
  1849.         MOVE.l  #-1,d0
  1850. 'noobj: RTS
  1851.  
  1852. _keybutton:
  1853.         MOVE.l  d1,d0
  1854.         MOVE.l  -4(a2),d1
  1855.         ALibJsr $cf01
  1856.         MOVE.l  d0,d5
  1857.         MOVEA.l d2,a0
  1858.         MOVEQ   #0,d2
  1859.         MOVE.b  (a0),d2
  1860.         MOVEA.l !s{tagl},a1
  1861.         TST.l   !s{tagl}
  1862.         BNE     'tlok
  1863.         MOVE.l  maxt(pc),d0
  1864.         LSL     #2,d0
  1865.         MOVE.w  d0,!s{size}
  1866.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1867.         ALibJsr $C002
  1868.         MOVE.l  d0,!s{tagl}
  1869.         BEQ     'noobj
  1870.         MOVEA.l d0,a1
  1871.         CLR.w   !s{tagp}
  1872. 'tlok:  MOVE.w  !s{tagp},d6
  1873.         ADDA.w  d6,a1
  1874.         MOVE.l  #MUIA_Frame,(a1)+
  1875.         MOVE.l  #MUIV_Frame_Button,(a1)+
  1876.         MOVE.l  #MUIA_Font,(a1)+
  1877.         MOVE.l  #MUIV_Font_Button,(a1)+
  1878.         MOVE.l  #MUIA_Text_Contents,(a1)+
  1879.         MOVE.l  d5,(a1)+
  1880.         MOVE.l  #MUIA_Text_PreParse,(a1)+
  1881.         LEA     cenc(pc),a0
  1882.         MOVE.l  a0,d0
  1883.         MOVE.l  #4,d1
  1884.         ALibJsr $cf01
  1885.         MOVE.l  d0,(a1)+
  1886.         MOVE.l  #MUIA_Text_HiChar,(a1)+
  1887.         MOVE.l  d2,(a1)+
  1888.         MOVE.l  #MUIA_ControlChar,(a1)+
  1889.         MOVE.l  d2,(a1)+
  1890.         MOVE.l  #MUIA_InputMode,(a1)+
  1891.         MOVE.l  #MUIV_InputMode_RelVerify,(a1)+
  1892.         MOVE.l  #MUIA_Background,(a1)+
  1893.         MOVE.l  #MUII_ButtonBack,(a1)+
  1894.         ADD.w   #64,d6
  1895.         MOVE.w  d6,!s{tagp}
  1896.         LEA     textclass(pc),a0
  1897.         MOVEA.l !s{tagl},a1
  1898.         !CALLMUI        {MUI_NewObjectA}
  1899.         MOVE.l  d0,!s{adr}
  1900.         BEQ     'noobj
  1901.         MOVE.w  #kind_gadget,!s{kind}
  1902.         MOVE.l  #-1,d0
  1903. 'noobj: RTS
  1904.  
  1905.  
  1906. _cycle:
  1907.         MOVEA.l !s{tagl},a1
  1908.         TST.l   !s{tagl}
  1909.         BNE     'tlok
  1910.         MOVE.l  maxt(pc),d0
  1911.         LSL     #2,d0
  1912.         MOVE.w  d0,!s{size}
  1913.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1914.         ALibJsr $C002
  1915.         MOVE.l  d0,!s{tagl}
  1916.         BEQ     'noobj
  1917.         MOVEA.l d0,a1
  1918.         CLR.w   !s{tagp}
  1919. 'tlok:  MOVE.w  !s{tagp},d6
  1920.         ADDA.w  d6,a1
  1921.         MOVE.l  #20,d0
  1922.         LSL     #2,d0
  1923.         MOVE.w  d0,!s{spesize}
  1924.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1925.         ALibJsr $C002
  1926.         MOVE.l  d0,!s{special}
  1927.         BEQ     'noobj
  1928.         MOVEA.l d0,a0
  1929.         SUBQ    #1,d7
  1930. 'loop:  MOVE.l  -(a2),d1
  1931.         MOVE.l  -(a2),d0
  1932.         ALibJsr $cf01
  1933.         MOVE.l  d0,(a0)+
  1934.         DBF     d7,'loop
  1935.         MOVE.l  #0,(a0)
  1936.         MOVE.l  #MUIA_Font,(a1)+
  1937.         MOVE.l  #MUIV_Font_Button,(a1)+
  1938.         MOVE.l  #MUIA_Cycle_Entries,(a1)+
  1939.         MOVE.l  !s{special},(a1)+
  1940.         ADD.w   #16,d6
  1941.         MOVE.w  d6,!s{tagp}
  1942.         LEA     cycleclass(pc),a0
  1943.         MOVEA.l !s{tagl},a1
  1944.         !CALLMUI        {MUI_NewObjectA}
  1945.         MOVE.l  d0,!s{adr}
  1946.         BEQ     'noobj
  1947.         MOVE.w  #kind_gadget,!s{kind}
  1948.         MOVE.l  #-1,d0
  1949. 'noobj: RTS
  1950.  
  1951. _cyclea:
  1952.         MOVE.l  d1,d5
  1953.         TST.l   !s{tagl}
  1954.         BNE     'tlok
  1955.         MOVE.l  maxt(pc),d0
  1956.         LSL     #2,d0
  1957.         MOVE.w  d0,!s{size}
  1958.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1959.         ALibJsr $C002
  1960.         MOVE.l  d0,!s{tagl}
  1961.         BEQ     'noobj
  1962.         CLR.w   !s{tagp}
  1963. 'tlok:
  1964.         MOVEA.l !s{tagl},a1
  1965.         MOVE.w  !s{tagp},d6
  1966.         ADDA.w  d6,a1
  1967.         MOVE.l  #MUIA_Font,(a1)+
  1968.         MOVE.l  #MUIV_Font_Button,(a1)+
  1969.         MOVE.l  #MUIA_Cycle_Entries,(a1)+
  1970.         MOVE.l  d5,(a1)+
  1971.         ADD.w   #16,d6
  1972.         MOVE.w  d6,!s{tagp}
  1973.         LEA     cycleclass(pc),a0
  1974.         MOVEA.l !s{tagl},a1
  1975.         !CALLMUI        {MUI_NewObjectA}
  1976.         MOVE.l  d0,!s{adr}
  1977.         BEQ     'noobj
  1978.         MOVE.w  #kind_gadget,!s{kind}
  1979.         MOVE.l  #-1,d0
  1980. 'noobj: RTS
  1981.  
  1982.  
  1983. _keycycle:
  1984.         MOVEA.l d1,a0
  1985.         MOVEQ   #0,d5
  1986.         MOVE.b  (a0),d5
  1987.         MOVEA.l !s{tagl},a1
  1988.         TST.l   !s{tagl}
  1989.         BNE     'tlok
  1990.         MOVE.l  maxt(pc),d0
  1991.         LSL     #2,d0
  1992.         MOVE.w  d0,!s{size}
  1993.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  1994.         ALibJsr $C002
  1995.         MOVE.l  d0,!s{tagl}
  1996.         BEQ     'noobj
  1997.         MOVEA.l d0,a1
  1998.         CLR.w   !s{tagp}
  1999. 'tlok:  MOVE.w  !s{tagp},d6
  2000.         ADDA.w  d6,a1
  2001.         MOVE.l  #20,d0
  2002.         LSL     #2,d0
  2003.         MOVE.w  d0,!s{spesize}
  2004.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2005.         ALibJsr $C002
  2006.         MOVE.l  d0,!s{special}
  2007.         BEQ     'noobj
  2008.         MOVEA.l d0,a0
  2009.         SUBQ    #1,d7
  2010.         TST.l   -(a2)
  2011. 'loop:  MOVE.l  -(a2),d1
  2012.         MOVE.l  -(a2),d0
  2013.         ALibJsr $cf01
  2014.         MOVE.l  d0,(a0)+
  2015.         DBF     d7,'loop
  2016.         MOVE.l  #0,(a0)+
  2017.         MOVE.l  #MUIA_Font,(a1)+
  2018.         MOVE.l  #MUIV_Font_Button,(a1)+
  2019.         MOVE.l  #MUIA_Cycle_Entries,(a1)+
  2020.         MOVE.l  !s{special},(a1)+
  2021.         MOVE.l  #MUIA_ControlChar,(a1)+
  2022.         MOVE.l  d5,(a1)+
  2023.         ADD.w   #24,d6
  2024.         MOVE.w  d6,!s{tagp}
  2025.         LEA     cycleclass(pc),a0
  2026.         MOVEA.l !s{tagl},a1
  2027.         !CALLMUI        {MUI_NewObjectA}
  2028.         MOVE.l  d0,!s{adr}
  2029.         BEQ     'noobj
  2030.         MOVE.w  #kind_gadget,!s{kind}
  2031.         MOVE.l  #-1,d0
  2032. 'noobj: RTS
  2033.  
  2034. _keycyclea:
  2035.         MOVEA.l d1,a0
  2036.         MOVEQ   #0,d5
  2037.         MOVE.b  (a0),d5
  2038.         MOVE.l  d2,d4
  2039.         TST.l   !s{tagl}
  2040.         BNE     'tlok
  2041.         MOVE.l  maxt(pc),d0
  2042.         LSL     #2,d0
  2043.         MOVE.w  d0,!s{size}
  2044.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2045.         ALibJsr $C002
  2046.         MOVE.l  d0,!s{tagl}
  2047.         BEQ     'noobj
  2048.         CLR.w   !s{tagp}
  2049. 'tlok:
  2050.         MOVEA.l !s{tagl},a1
  2051.         MOVE.w  !s{tagp},d6
  2052.         ADDA.w  d6,a1
  2053.         MOVE.l  #MUIA_Font,(a1)+
  2054.         MOVE.l  #MUIV_Font_Button,(a1)+
  2055.         MOVE.l  #MUIA_Cycle_Entries,(a1)+
  2056.         MOVE.l  d4,(a1)+
  2057.         MOVE.l  #MUIA_ControlChar,(a1)+
  2058.         MOVE.l  d5,(a1)+
  2059.         ADD.w   #24,d6
  2060.         MOVE.w  d6,!s{tagp}
  2061.         LEA     cycleclass(pc),a0
  2062.         MOVEA.l !s{tagl},a1
  2063.         !CALLMUI        {MUI_NewObjectA}
  2064.         MOVE.l  d0,!s{adr}
  2065.         BEQ     'noobj
  2066.         MOVE.w  #kind_gadget,!s{kind}
  2067.         MOVE.l  #-1,d0
  2068. 'noobj: RTS
  2069.  
  2070. _radio:
  2071.         MOVE.l  d1,d0
  2072.         MOVE.l  -(a2),d1
  2073.         ALibJsr $cf01
  2074.         MOVE.l  d0,d4
  2075.         MOVEA.l !s{tagl},a1
  2076.         TST.l   !s{tagl}
  2077.         BNE     'tlok
  2078.         MOVE.l  maxt(pc),d0
  2079.         LSL     #2,d0
  2080.         MOVE.w  d0,!s{size}
  2081.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2082.         ALibJsr $C002
  2083.         MOVE.l  d0,!s{tagl}
  2084.         BEQ     'noobj
  2085.         MOVEA.l d0,a1
  2086.         CLR.w   !s{tagp}
  2087. 'tlok:  MOVE.w  !s{tagp},d6
  2088.         ADDA.w  d6,a1
  2089.         MOVE.l  #20,d0
  2090.         LSL     #2,d0
  2091.         MOVE.w  d0,!s{spesize}
  2092.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2093.         ALibJsr $C002
  2094.         MOVE.l  d0,!s{special}
  2095.         BEQ     'noobj
  2096.         MOVEA.l d0,a0
  2097.         SUBQ    #1,d7
  2098. 'loop:  MOVE.l  -(a2),d1
  2099.         MOVE.l  -(a2),d0
  2100.         ALibJsr $cf01
  2101.         MOVE.l  d0,(a0)+
  2102.         DBF     d7,'loop
  2103.         MOVE.l  #0,(a0)+
  2104.         MOVE.l  #MUIA_Frame,(a1)+
  2105.         MOVE.l  #MUIV_Frame_Group,(a1)+
  2106.         MOVE.l  #MUIA_FrameTitle,(a1)+
  2107.         MOVE.l  d4,(a1)+
  2108.         MOVE.l  #MUIA_Background,(a1)+
  2109.         MOVE.l  #MUII_GroupBack,(a1)+
  2110.         MOVE.l  #MUIA_Radio_Entries,(a1)+
  2111.         MOVE.l  !s{special},(a1)+
  2112.         ADD.w   #32,d6
  2113.         MOVE.w  d6,!s{tagp}
  2114.         LEA     radioclass(pc),a0
  2115.         MOVEA.l !s{tagl},a1
  2116.         !CALLMUI        {MUI_NewObjectA}
  2117.         MOVE.l  d0,!s{adr}
  2118.         BEQ     'noobj
  2119.         MOVE.w  #kind_gadget,!s{kind}
  2120.         MOVE.l  #-1,d0
  2121. 'noobj: RTS
  2122.  
  2123. _radioa:
  2124.         MOVE.l  d1,d4
  2125.         MOVE.l  d2,d5
  2126.         TST.l   !s{tagl}
  2127.         BNE     'tlok
  2128.         MOVE.l  maxt(pc),d0
  2129.         LSL     #2,d0
  2130.         MOVE.w  d0,!s{size}
  2131.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2132.         ALibJsr $C002
  2133.         MOVE.l  d0,!s{tagl}
  2134.         BEQ     'noobj
  2135.         MOVEA.l d0,a1
  2136.         CLR.w   !s{tagp}
  2137. 'tlok:
  2138.         MOVEA.l !s{tagl},a1
  2139.         MOVE.w  !s{tagp},d6
  2140.         ADDA.w  d6,a1
  2141.         MOVE.l  #MUIA_Frame,(a1)+
  2142.         MOVE.l  #MUIV_Frame_Group,(a1)+
  2143.         MOVE.l  #MUIA_FrameTitle,(a1)+
  2144.         MOVE.l  d4,(a1)+
  2145.         MOVE.l  #MUIA_Background,(a1)+
  2146.         MOVE.l  #MUII_GroupBack,(a1)+
  2147.         MOVE.l  #MUIA_Radio_Entries,(a1)+
  2148.         MOVE.l  d5,(a1)+
  2149.         ADD.w   #32,d6
  2150.         MOVE.w  d6,!s{tagp}
  2151.         LEA     radioclass(pc),a0
  2152.         MOVEA.l !s{tagl},a1
  2153.         !CALLMUI        {MUI_NewObjectA}
  2154.         MOVE.l  d0,!s{adr}
  2155.         BEQ     'noobj
  2156.         MOVE.w  #kind_gadget,!s{kind}
  2157.         MOVE.l  #-1,d0
  2158. 'noobj: RTS
  2159.  
  2160.  
  2161. _keyradio:
  2162.         MOVE.l  d1,d0
  2163.         MOVE.l  -(a2),d1
  2164.         ALibJsr $cf01
  2165.         MOVE.l  d0,d4
  2166.         MOVEA.l d2,a0
  2167.         MOVEQ   #0,d5
  2168.         MOVE.b  (a0),d5
  2169.         MOVEA.l !s{tagl},a1
  2170.         TST.l   !s{tagl}
  2171.         BNE     'tlok
  2172.         MOVE.l  maxt(pc),d0
  2173.         LSL     #2,d0
  2174.         MOVE.w  d0,!s{size}
  2175.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2176.         ALibJsr $C002
  2177.         MOVE.l  d0,!s{tagl}
  2178.         BEQ     'noobj
  2179.         MOVEA.l d0,a1
  2180.         CLR.w   !s{tagp}
  2181. 'tlok:  MOVE.w  !s{tagp},d6
  2182.         ADDA.w  d6,a1
  2183.         MOVE.l  #20,d0
  2184.         LSL     #2,d0
  2185.         MOVE.w  d0,!s{spesize}
  2186.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2187.         ALibJsr $C002
  2188.         MOVE.l  d0,!s{special}
  2189.         BEQ     'noobj
  2190.         MOVEA.l d0,a0
  2191.         SUBQ    #1,d7
  2192.         TST.l   -(a2)
  2193. 'loop:  MOVE.l  -(a2),d1
  2194.         MOVE.l  -(a2),d0
  2195.         ALibJsr $cf01
  2196.         MOVE.l  d0,(a0)+
  2197.         DBF     d7,'loop
  2198.         MOVE.l  #0,(a0)+
  2199.         MOVE.l  #MUIA_Frame,(a1)+
  2200.         MOVE.l  #MUIV_Frame_Group,(a1)+
  2201.         MOVE.l  #MUIA_FrameTitle,(a1)+
  2202.         MOVE.l  d4,(a1)+
  2203.         MOVE.l  #MUIA_Background,(a1)+
  2204.         MOVE.l  #MUII_GroupBack,(a1)+
  2205.         MOVE.l  #MUIA_Radio_Entries,(a1)+
  2206.         MOVE.l  !s{special},(a1)+
  2207.         MOVE.l  #MUIA_ControlChar,(a1)+
  2208.         MOVE.l  d5,(a1)+
  2209.         ADD.w   #40,d6
  2210.         MOVE.w  d6,!s{tagp}
  2211.         LEA     radioclass(pc),a0
  2212.         MOVEA.l !s{tagl},a1
  2213.         !CALLMUI        {MUI_NewObjectA}
  2214.         MOVE.l  d0,!s{adr}
  2215.         BEQ     'noobj
  2216.         MOVE.w  #kind_gadget,!s{kind}
  2217.         MOVE.l  #-1,d0
  2218. 'noobj: RTS
  2219.  
  2220. _keyradioa:
  2221.         MOVE.l  d1,d4
  2222.         MOVEA.l d2,a0
  2223.         MOVEQ   #0,d5
  2224.         MOVE.b  (a0),d5
  2225.         TST.l   !s{tagl}
  2226.         BNE     'tlok
  2227.         MOVE.l  maxt(pc),d0
  2228.         LSL     #2,d0
  2229.         MOVE.w  d0,!s{size}
  2230.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2231.         ALibJsr $C002
  2232.         MOVE.l  d0,!s{tagl}
  2233.         BEQ     'noobj
  2234.         CLR.w   !s{tagp}
  2235. 'tlok:
  2236.         MOVEA.l !s{tagl},a1
  2237.         MOVE.w  !s{tagp},d6
  2238.         ADDA.w  d6,a1
  2239.         MOVE.l  #MUIA_Frame,(a1)+
  2240.         MOVE.l  #MUIV_Frame_Group,(a1)+
  2241.         MOVE.l  #MUIA_FrameTitle,(a1)+
  2242.         MOVE.l  d4,(a1)+
  2243.         MOVE.l  #MUIA_Background,(a1)+
  2244.         MOVE.l  #MUII_GroupBack,(a1)+
  2245.         MOVE.l  #MUIA_Radio_Entries,(a1)+
  2246.         MOVE.l  d3,(a1)+
  2247.         MOVE.l  #MUIA_ControlChar,(a1)+
  2248.         MOVE.l  d5,(a1)+
  2249.         ADD.w   #40,d6
  2250.         MOVE.w  d6,!s{tagp}
  2251.         LEA     radioclass(pc),a0
  2252.         MOVEA.l !s{tagl},a1
  2253.         !CALLMUI        {MUI_NewObjectA}
  2254.         MOVE.l  d0,!s{adr}
  2255.         BEQ     'noobj
  2256.         MOVE.w  #kind_gadget,!s{kind}
  2257.         MOVE.l  #-1,d0
  2258. 'noobj: RTS
  2259.  
  2260.  
  2261. _slider:
  2262.         MOVE.l  d1,d5
  2263.         MOVEA.l !s{tagl},a1
  2264.         TST.l   !s{tagl}
  2265.         BNE     'tlok
  2266.         MOVE.l  maxt(pc),d0
  2267.         LSL     #2,d0
  2268.         MOVE.w  d0,!s{size}
  2269.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2270.         ALibJsr $C002
  2271.         MOVE.l  d0,!s{tagl}
  2272.         BEQ     'noobj
  2273.         MOVEA.l d0,a1
  2274.         CLR.w   !s{tagp}
  2275. 'tlok:  MOVE.w  !s{tagp},d6
  2276.         ADDA.w  d6,a1
  2277.         MOVE.l  #MUIA_Numeric_Min,(a1)+
  2278.         MOVE.l  d5,(a1)+
  2279.         MOVE.l  #MUIA_Numeric_Max,(a1)+
  2280.         MOVE.l  d2,(a1)+
  2281.         MOVE.l  #MUIA_Numeric_Value,(a1)+
  2282.         MOVE.l  d3,(a1)+
  2283.         ADD.w   #24,d6
  2284.         MOVE.w  d6,!s{tagp}
  2285.         LEA     sliderclass(pc),a0
  2286.         MOVEA.l !s{tagl},a1
  2287.         !CALLMUI        {MUI_NewObjectA}
  2288.         MOVE.l  d0,!s{adr}
  2289.         BEQ     'noobj
  2290.         MOVE.w  #kind_gadget,!s{kind}
  2291.         MOVE.l  #-1,d0
  2292. 'noobj: RTS
  2293.  
  2294. _keyslider:
  2295.         MOVE.l  d1,d5
  2296.         MOVE.l  d4,a0
  2297.         MOVEQ   #0,d4
  2298.         MOVE.b  (a0),d4
  2299.         MOVEA.l !s{tagl},a1
  2300.         TST.l   !s{tagl}
  2301.         BNE     'tlok
  2302.         MOVE.l  maxt(pc),d0
  2303.         LSL     #2,d0
  2304.         MOVE.w  d0,!s{size}
  2305.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2306.         ALibJsr $C002
  2307.         MOVE.l  d0,!s{tagl}
  2308.         BEQ     'noobj
  2309.         MOVEA.l d0,a1
  2310.         CLR.w   !s{tagp}
  2311. 'tlok:  MOVE.w  !s{tagp},d6
  2312.         ADDA.w  d6,a1
  2313.         MOVE.l  #MUIA_Numeric_Min,(a1)+
  2314.         MOVE.l  d5,(a1)+
  2315.         MOVE.l  #MUIA_Numeric_Max,(a1)+
  2316.         MOVE.l  d2,(a1)+
  2317.         MOVE.l  #MUIA_Numeric_Value,(a1)+
  2318.         MOVE.l  d3,(a1)+
  2319.         MOVE.l  #MUIA_ControlChar,(a1)+
  2320.         MOVE.l  d4,(a1)+
  2321.         ADD.w   #32,d6
  2322.         MOVE.w  d6,!s{tagp}
  2323.         LEA     sliderclass(pc),a0
  2324.         MOVEA.l !s{tagl},a1
  2325.         !CALLMUI        {MUI_NewObjectA}
  2326.         MOVE.l  d0,!s{adr}
  2327.         BEQ     'noobj
  2328.         MOVE.w  #kind_gadget,!s{kind}
  2329.         MOVE.l  #-1,d0
  2330. 'noobj: RTS
  2331.  
  2332.  
  2333. _label:
  2334.         BSR     _freeobj
  2335.         LEA     args(pc),a1
  2336.         MOVE.l  a1,d3
  2337.         MOVE.l  d1,d0
  2338.         MOVE.l  -4(a2),d1
  2339.         ALibJsr $cf01
  2340.         MOVE.l  d0,(a1)+
  2341.         MOVE.l  d2,(a1)+
  2342.         MOVE.l  #0,(a1)+
  2343.         MOVEA.l d3,a0
  2344.         MOVE.l  #MUIO_Label,d0
  2345.         !CALLMUI        {MUI_MakeObjectA}
  2346.         MOVE.l  d0,!s{adr}
  2347.         BEQ     'noobj
  2348.         CLR.l   !s{tagl}
  2349.         CLR.w   !s{size}
  2350.         MOVE.w  #kind_label,!s{kind}
  2351.         MOVE.l  #-1,d0
  2352. 'noobj: RTS
  2353.  
  2354.  
  2355. _numbutton:  ;MUIObject,&format$,min,max (a3,d1,d2,d3)
  2356.         BSR     _freeobj
  2357.         MOVEQ   #0,d0
  2358.         LEA     args(pc),a0
  2359.         MOVE.l  a0,d5
  2360.         MOVE.l  #0,(a0)+
  2361.         MOVE.l  d2,(a0)+
  2362.         MOVE.l  d3,(a0)+
  2363.         MOVE.l  d1,d0
  2364.         MOVE.l  -4(a2),d1
  2365.         ALibJsr $cf01
  2366.         MOVE.l  d0,(a0)+
  2367.         MOVE.l  #0,(a0)+
  2368.         MOVEA.l d5,a0
  2369.         MOVE.l  #MUIO_NumericButton,d0
  2370.         !CALLMUI        {MUI_MakeObjectA}
  2371.         MOVE.l  d0,!s{adr}
  2372.         BEQ     'noobj
  2373.         CLR.l   !s{tagl}
  2374.         CLR.w   !s{size}
  2375.         MOVE.w  #kind_gadget,!s{kind}
  2376.         MOVE.l  #-1,d0
  2377. 'noobj: RTS
  2378.                                                                                                                         
  2379. _listhook:
  2380.         MOVE.l  d0,uhook
  2381.         RTS
  2382.  
  2383. ._list: ;d1=f$ d2=arr$
  2384.         MOVEQ   #0,d0
  2385.         MOVE.l  d2,d4
  2386.         MOVE.l  d1,d0
  2387.         MOVE.l  -(a2),d1
  2388.         ALibJsr $cf01
  2389.         MOVE.l  d0,d3
  2390.         MOVEQ   #0,d0
  2391.         MOVEA.l !s{tagl},a1
  2392.         TST.l   !s{tagl}
  2393.         BNE     'tlok
  2394.         MOVE.l  maxt(pc),d0
  2395.         LSL     #2,d0
  2396.         MOVE.w  d0,!s{size}
  2397.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2398.         ALibJsr $C002
  2399.         MOVE.l  d0,!s{tagl}
  2400.         BEQ     'noobj
  2401.         MOVEA.l d0,a1
  2402.         CLR.w   !s{tagp}
  2403. 'tlok:  MOVE.w  !s{tagp},d6
  2404.         ADDA.w  d6,a1
  2405.         TST.l   uhook
  2406.         BEQ     'nocol
  2407.         MOVE.l  #MUIA_List_DisplayHook,(a1)+
  2408.         MOVE.l  #27,d2                    ;max col = 20
  2409.         LSL     #2,d2
  2410.         MOVE.w  d2,!s{spe2size}
  2411.         MOVE.l  d2,d0
  2412.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2413.         ALibJsr $C002
  2414.         MOVE.l  d0,!s{spe2}
  2415.         BEQ     'noobj
  2416.         LEA     DHook(pc),a0
  2417.         MOVE.l  a1,-(a7)
  2418.         MOVEA.l !s{spe2},a1
  2419. 'looph: MOVE.l  (a0)+,(a1)+
  2420.         BNE     'looph
  2421.         MOVE.l  #SizeOf.Hook,d0
  2422.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2423.         ALibJsr $C002
  2424.         MOVE.l  d0,a0
  2425.         BEQ     'noobj
  2426.         MOVE.l  !s{spe2},SizeOf.Hook\h_Entry(a0)
  2427.         MOVEA.l (a7)+,a1
  2428.         MOVE.l  a0,(a1)+
  2429.         ADDQ.w  #8,d6
  2430. 'nocol: MOVE.l  #MUIA_List_Format,(a1)+
  2431.         MOVE.l  d3,(a1)+
  2432.         MOVE.l  #MUIA_List_SourceArray,(a1)+
  2433.         MOVE.l  d4,(a1)+
  2434.         ADD.w   #16,d6
  2435.         MOVE.w  d6,!s{tagp}
  2436.         LEA     listclass(pc),a0
  2437.         MOVEA.l !s{tagl},a1
  2438.         !CALLMUI        {MUI_NewObjectA}
  2439.         MOVE.l  d0,!s{adr}
  2440.         BEQ     'noobj
  2441.         MOVE.l  #-1,d0
  2442. 'noobj: RTS
  2443.  
  2444. _chlista:
  2445.         MOVEQ   #0,d0
  2446.         MOVE.l  d1,d5
  2447.         MOVE.l  d2,d6
  2448.         TST.l   !s{adr}
  2449.         BEQ     'noobj
  2450.         BSR     _chlist
  2451.         MOVE.l  !s{adr},d0
  2452.         LEA     args(pc),a0
  2453.         MOVE.l  a0,d1
  2454.         MOVE.l  #MUIM_List_Insert,(a0)+
  2455.         MOVE.l  d5,(a0)+
  2456.         MOVE.l  #-1,(a0)+
  2457.         MOVE.l  d6,(a0)+
  2458.         BSR     _domethoda
  2459. 'noobj: RTS
  2460.  
  2461.  
  2462. ._chlist:
  2463.         MOVEQ   #0,d0
  2464.         TST.l   !s{adr}
  2465.         BEQ     'noobj
  2466.         MOVE.l  !s{adr},d0
  2467.         LEA     args(pc),a0
  2468.         MOVE.l  a0,d1
  2469.         MOVE.l  #MUIM_List_Clear,(a0)+
  2470.         MOVE.l  #0,(a0)+
  2471.         BSR     _domethoda
  2472. 'noobj: RTS
  2473.  
  2474.  
  2475.  
  2476.  
  2477. _listview:
  2478.         MOVEQ   #0,d0
  2479.         TST.l   !u{adr}
  2480.         BEQ     'noobj
  2481.         MOVEA.l !s{tagl},a1
  2482.         TST.l   !s{tagl}
  2483.         BNE     'tlok
  2484.         MOVE.l  maxt(pc),d0
  2485.         LSL     #2,d0
  2486.         MOVE.w  d0,!s{size}
  2487.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2488.         ALibJsr $C002
  2489.         MOVE.l  d0,!s{tagl}
  2490.         BEQ     'noobj
  2491.         MOVEA.l d0,a1
  2492.         CLR.w   !s{tagp}
  2493. 'tlok:  MOVE.w  !s{tagp},d6
  2494.         ADDA.w  d6,a1
  2495.         MOVE.l  #MUIA_Listview_List,(a1)+
  2496.         MOVE.l  !u{adr},(a1)+
  2497.         ADDQ.w  #8,d6
  2498.         MOVE.w  d6,!s{tagp}
  2499.         LEA     listviewclass(pc),a0
  2500.         MOVEA.l !s{tagl},a1
  2501.         !CALLMUI        {MUI_NewObjectA}
  2502.         MOVE.l  d0,!s{adr}
  2503.         BEQ     'noobj
  2504.         MOVE.l  #-1,d0
  2505. 'noobj: RTS
  2506.  
  2507. _popbutton:
  2508.         BSR     _freeobj
  2509.         MOVEQ   #0,d0
  2510.         LEA     args(pc),a0
  2511.         MOVE.l  a0,d5
  2512.         MOVE.l  d1,(a0)+
  2513.         MOVE.l  #0,(a0)+
  2514.         MOVEA.l d5,a0
  2515.         MOVE.l  #MUIO_PopButton,d0
  2516.         !CALLMUI        {MUI_MakeObjectA}
  2517.         MOVE.l  d0,!s{adr}
  2518.         BEQ     'noobj
  2519.         CLR.l   !s{tagl}
  2520.         CLR.w   !s{size}
  2521.         MOVE.w  #kind_gadget,!s{kind}
  2522.         MOVE.l  #-1,d0
  2523. 'noobj: RTS
  2524.  
  2525. _imagebutton:
  2526.         MOVEQ   #0,d0
  2527.         TST.l   0(a0)
  2528.         BEQ     'noobj
  2529.         MOVEA.l !s{tagl},a1
  2530.         TST.l   !s{tagl}
  2531.         BNE     'tlok
  2532.         MOVE.l  maxt(pc),d0
  2533.         LSL     #2,d0
  2534.         MOVE.w  d0,!s{size}
  2535.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2536.         ALibJsr $C002
  2537.         MOVE.l  d0,!s{tagl}
  2538.         BEQ     'noobj
  2539.         MOVEA.l d0,a1
  2540.         CLR.w   !s{tagp}
  2541. 'tlok:  MOVE.w  !s{tagp},d6
  2542.         ADDA.w  d6,a1
  2543.         MOVE.l  #SizeOf.Image,d0
  2544.         MOVE.w  d0,!s{spesize}
  2545.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2546.         ALibJsr $C002
  2547.         MOVE.l  d0,!s{special}
  2548.         BEQ     'noobj
  2549.         MOVEA.l d0,a2
  2550.         MOVE.l  (a0),4(a2)
  2551.         MOVE.w  4(a0),8(a2)
  2552.         MOVE.l  14(a0),10(a2)
  2553.         MOVEQ   #1,d0
  2554.         MOVE.w  4(a0),d1
  2555.         LSL     d1,d0
  2556.         SUBQ    #1,d0
  2557.         MOVE.b  d0,14(a2)
  2558.         MOVE.l  #MUIA_Image_OldImage,(a1)+
  2559.         MOVE.l  !s{special},(a1)+
  2560.         ADD.w   #8,d6
  2561.         MOVE.w  d6,!s{tagp}
  2562.         LEA     imageclass(pc),a0
  2563.         MOVEA.l !s{tagl},a1
  2564.         !CALLMUI        {MUI_NewObjectA}
  2565.         MOVE.l  d0,!s{adr}
  2566.         BEQ     'noobj
  2567.         MOVE.l  #-1,d0
  2568. 'noobj: RTS
  2569.  
  2570. _balance:
  2571.         MOVEA.l !s{tagl},a1
  2572.         TST.l   !s{tagl}
  2573.         BNE     'tlok
  2574.         MOVE.l  maxt(pc),d0
  2575.         LSL     #2,d0
  2576.         MOVE.w  d0,!s{size}
  2577.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2578.         ALibJsr $C002
  2579.         MOVE.l  d0,!s{tagl}
  2580.         BEQ     'noobj
  2581.         MOVEA.l d0,a1
  2582.         CLR.w   !s{tagp}
  2583. 'tlok:  MOVE.w  !s{tagp},d6
  2584.         ADDA.w  d6,a1
  2585.         MOVE.l  #0,(a1)
  2586.         LEA     balanceclass(pc),a0
  2587.         MOVEA.l !s{tagl},a1
  2588.         !CALLMUI        {MUI_NewObjectA}
  2589.         MOVE.l  d0,!s{adr}
  2590.         BEQ     'noobj
  2591.         MOVE.w  #kind_other,!s{kind}
  2592.         MOVE.l  #-1,d0
  2593. 'noobj: RTS
  2594.  
  2595. _bitmap:
  2596.         MOVEA.l !s{tagl},a1
  2597.         TST.l   !s{tagl}
  2598.         BNE     'tlok
  2599.         MOVE.l  maxt(pc),d0
  2600.         LSL     #2,d0
  2601.         MOVE.w  d0,!s{size}
  2602.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2603.         ALibJsr $C002
  2604.         MOVE.l  d0,!s{tagl}
  2605.         BEQ     'noobj
  2606.         MOVEA.l d0,a1
  2607.         CLR.w   !s{tagp}
  2608. 'tlok:  MOVE.w  !s{tagp},d6
  2609.         ADDA.w  d6,a1
  2610.         MOVE.l  #MUIA_Bitmap_Bitmap,(a1)+
  2611.         MOVE.l  a2,(a1)+
  2612.         MOVE.l  #MUIA_Bitmap_Width,(a1)+
  2613.         MOVEQ   #0,d0
  2614.         MOVE.w  (a2),d0
  2615.         LSL.w   #3,d0
  2616.         MOVE.l  d0,(a1)+
  2617.         MOVE.l  #MUIA_Bitmap_Height,(a1)+
  2618.         MOVE.w  #0,(a1)+
  2619.         MOVE.w  2(a2),(a1)+
  2620.         MOVE.l  #0,(a1)
  2621.         ADDI.w  #24,d6
  2622.         MOVE.w  d6,!s{tagp}
  2623.         LEA     bitmapclass(pc),a0
  2624.         MOVEA.l !s{tagl},a1
  2625.         !CALLMUI        {MUI_NewObjectA}
  2626.         MOVE.l  d0,!s{adr}
  2627.         BEQ     'noobj
  2628.         MOVE.w  #kind_other,!s{kind}
  2629.         MOVE.l  #-1,d0
  2630. 'noobj: RTS
  2631.  
  2632. _bitmappal:
  2633.         MOVEA.l !s{tagl},a1
  2634.         TST.l   !s{tagl}
  2635.         BNE     'tlok
  2636.         MOVE.l  maxt(pc),d0
  2637.         LSL     #2,d0
  2638.         MOVE.w  d0,!s{size}
  2639.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2640.         ALibJsr $C002
  2641.         MOVE.l  d0,!s{tagl}
  2642.         BEQ     'noobj
  2643.         MOVEA.l d0,a1
  2644.         CLR.w   !s{tagp}
  2645. 'tlok:  MOVE.w  !s{tagp},d6
  2646.         ADDA.w  d6,a1
  2647.         MOVE.l  #MUIA_Bitmap_Bitmap,(a1)+
  2648.         MOVE.l  a2,(a1)+
  2649.         MOVE.l  #MUIA_Bitmap_Width,(a1)+
  2650.         MOVEQ   #0,d0
  2651.         MOVE.w  (a2),d0
  2652.         LSL.w   #3,d0
  2653.         MOVE.l  d0,(a1)+
  2654.         MOVE.l  #MUIA_Bitmap_Height,(a1)+
  2655.         MOVE.w  #0,(a1)+
  2656.         MOVE.w  2(a2),(a1)+
  2657.         MOVE.l  #MUIA_Bitmap_SourceColors,(a1)+
  2658.         MOVEA.l (a0),a0
  2659.         LEA     4(a0),a0
  2660.         MOVE.l  a0,(a1)+
  2661.         ADDI.w  #32,d6
  2662.         MOVE.w  d6,!s{tagp}
  2663.         LEA     bitmapclass(pc),a0
  2664.         MOVEA.l !s{tagl},a1
  2665.         !CALLMUI        {MUI_NewObjectA}
  2666.         MOVE.l  d0,!s{adr}
  2667.         BEQ     'noobj
  2668.         MOVE.w  #kind_other,!s{kind}
  2669.         MOVE.l  #-1,d0
  2670. 'noobj: RTS
  2671.  
  2672. _shape:
  2673.         MOVEA.l !s{tagl},a1
  2674.         TST.l   !s{tagl}
  2675.         BNE     'tlok
  2676.         MOVE.l  maxt(pc),d0
  2677.         LSL     #2,d0
  2678.         MOVE.w  d0,!s{size}
  2679.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2680.         ALibJsr $C002
  2681.         MOVE.l  d0,!s{tagl}
  2682.         BEQ     'noobj
  2683.         MOVEA.l d0,a1
  2684.         CLR.w   !s{tagp}
  2685. 'tlok:  MOVE.w  !s{tagp},d6
  2686.         ADDA.w  d6,a1
  2687.         MOVE.l  #SizeOf.BitMap,d0
  2688.         MOVE.w  d0,!s{spesize}
  2689.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2690.         ALibJsr $C002
  2691.         MOVE.l  d0,!s{special}
  2692.         BEQ     'noobj
  2693.         MOVEA.l d0,a0
  2694.         MOVE.w  6(a2),(a0)
  2695.         MOVE.w  2(a2),2(a0)
  2696.         MOVE.w  4(a2),4(a0)
  2697.         MOVEQ   #0,d7
  2698.         MOVEQ   #0,d0
  2699.         MOVE.w  4(a2),d7
  2700.         SUBQ    #1,d7
  2701.         MOVE.w  22(a2),d1
  2702.         MOVE.l  a1,-(a7)
  2703. 'loop:  MOVE.l  d7,d0
  2704.         MOVE.l  d7,d2
  2705.         LSL     #2,d2
  2706.         MULU    d1,d0
  2707.         MOVEA.l 14(a2),a1
  2708.         ADDA.l  d0,a1
  2709.         MOVE.l  a1,8(a0,d2.l)
  2710.         DBF     d7,'loop
  2711.         MOVEA.l (a7)+,a1
  2712.         MOVE.l  #MUIA_Bitmap_Bitmap,(a1)+
  2713.         MOVE.l  a0,(a1)+
  2714.         MOVE.l  #MUIA_Bitmap_Width,(a1)+
  2715.         MOVE.w  #0,(a1)+
  2716.         MOVE.w  (a2),(a1)+
  2717.         MOVE.l  #MUIA_Bitmap_Height,(a1)+
  2718.         MOVE.w  #0,(a1)+
  2719.         MOVE.w  2(a2),(a1)+
  2720.         ADDI.w  #24,d6
  2721.         MOVE.w  d6,!s{tagp}
  2722.         LEA     bitmapclass(pc),a0
  2723.         MOVEA.l !s{tagl},a1
  2724.         !CALLMUI        {MUI_NewObjectA}
  2725.         MOVE.l  d0,!s{adr}
  2726.         BEQ     'noobj
  2727.         MOVE.w  #kind_other,!s{kind}
  2728.         MOVE.l  #-1,d0
  2729. 'noobj: RTS
  2730.  
  2731. _shapepal:
  2732.         MOVEA.l !s{tagl},a1
  2733.         TST.l   !s{tagl}
  2734.         BNE     'tlok
  2735.         MOVE.l  maxt(pc),d0
  2736.         LSL     #2,d0
  2737.         MOVE.w  d0,!s{size}
  2738.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2739.         ALibJsr $C002
  2740.         MOVE.l  d0,!s{tagl}
  2741.         BEQ     'noobj
  2742.         MOVEA.l d0,a1
  2743.         CLR.w   !s{tagp}
  2744. 'tlok:  MOVE.w  !s{tagp},d6
  2745.         ADDA.w  d6,a1
  2746.         MOVE.l  #SizeOf.BitMap,d0
  2747.         MOVE.w  d0,!s{spesize}
  2748.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2749.         ALibJsr $C002
  2750.         MOVE.l  d0,!s{special}
  2751.         BEQ     'noobj
  2752.         MOVEM.l a0-a1,-(a7)
  2753.         MOVEA.l d0,a0
  2754.         MOVE.w  6(a2),(a0)
  2755.         MOVE.w  2(a2),2(a0)
  2756.         MOVE.w  4(a2),4(a0)
  2757.         MOVEQ   #0,d7
  2758.         MOVEQ   #0,d0
  2759.         MOVE.w  4(a2),d7
  2760.         SUBQ    #1,d7
  2761.         MOVE.w  22(a2),d1
  2762. 'loop:  MOVE.l  d7,d0
  2763.         MOVE.l  d7,d2
  2764.         LSL     #2,d2
  2765.         MULU    d1,d0
  2766.         MOVEA.l 14(a2),a1
  2767.         ADDA.l  d0,a1
  2768.         MOVE.l  a1,8(a0,d2.l)
  2769.         DBF     d7,'loop
  2770.         MOVEM.l (a7)+,a0-a1
  2771.         MOVE.l  #MUIA_Bitmap_Bitmap,(a1)+
  2772.         MOVE.l  !s{special},(a1)+
  2773.         MOVE.l  #MUIA_Bitmap_Width,(a1)+
  2774.         MOVE.w  #0,(a1)+
  2775.         MOVE.w  (a2),(a1)+
  2776.         MOVE.l  #MUIA_Bitmap_Height,(a1)+
  2777.         MOVE.w  #0,(a1)+
  2778.         MOVE.w  2(a2),(a1)+
  2779.         MOVE.l  #MUIA_Bitmap_SourceColors,(a1)+
  2780.         MOVEA.l (a0),a0
  2781.         LEA     4(a0),a0
  2782.         MOVE.l  a0,(a1)
  2783.         ADDI.w  #32,d6
  2784.         MOVE.w  d6,!s{tagp}
  2785.         LEA     bitmapclass(pc),a0
  2786.         MOVEA.l !s{tagl},a1
  2787.         !CALLMUI        {MUI_NewObjectA}
  2788.         MOVE.l  d0,!s{adr}
  2789.         BEQ     'noobj
  2790.         MOVE.w  #kind_other,!s{kind}
  2791.         MOVE.l  #-1,d0
  2792. 'noobj: RTS
  2793.  
  2794.  
  2795. _chbitmap:
  2796.         MOVE.l  !s{adr},d0
  2797.         BEQ     'noobj
  2798.         LEA     args(pc),a1
  2799.         MOVE.l  a1,d3
  2800.         MOVE.l  #MUIA_Bitmap_Bitmap,(a1)+
  2801.         MOVE.l  a2,(a1)+
  2802.         MOVE.l  #MUIA_Bitmap_Width,(a1)+
  2803.         MOVEQ   #0,d0
  2804.         MOVE.w  (a2),d0
  2805.         LSL.w   #3,d0
  2806.         MOVE.l  d0,(a1)+
  2807.         MOVE.l  #MUIA_Bitmap_Height,(a1)+
  2808.         MOVE.w  #0,(a1)+
  2809.         MOVE.w  2(a2),(a1)+
  2810.         MOVE.l  #0,(a1)
  2811.         MOVEA.l d3,a1
  2812.         MOVEA.l !s{adr},a0
  2813.         JSR     -648(a6)
  2814. 'noobj: RTS
  2815.  
  2816. _chbitmappal:
  2817.         TST.l   !s{adr}
  2818.         BEQ     'noobj
  2819.         LEA     args(pc),a1
  2820.         MOVE.l  a1,d3
  2821.         MOVE.l  #MUIA_Bitmap_Bitmap,(a1)+
  2822.         MOVE.l  a2,(a1)+
  2823.         MOVE.l  #MUIA_Bitmap_Width,(a1)+
  2824.         MOVEQ   #0,d0
  2825.         MOVE.w  (a2),d0
  2826.         LSL.w   #3,d0
  2827.         MOVE.l  d0,(a1)+
  2828.         MOVE.l  #MUIA_Bitmap_Height,(a1)+
  2829.         MOVE.w  #0,(a1)+
  2830.         MOVE.w  2(a2),(a1)+
  2831.         MOVE.l  #MUIA_Bitmap_SourceColors,(a1)+
  2832.         MOVEA.l (a0),a0
  2833.         LEA     4(a0),a0
  2834.         MOVE.l  a0,(a1)+
  2835.         MOVE.l  #0,(a1)
  2836.         MOVEA.l d3,a1
  2837.         MOVEA.l !s{adr},a0
  2838.         JSR     -648(a6)
  2839. 'noobj: RTS
  2840.  
  2841. _chshape:
  2842.         TST.l   !s{adr}
  2843.         BEQ     'noobj
  2844.         MOVE.l  !s{special},a0
  2845.         MOVE.w  6(a2),(a0)
  2846.         MOVE.w  2(a2),2(a0)
  2847.         MOVE.w  4(a2),4(a0)
  2848.         MOVEQ   #0,d7
  2849.         MOVEQ   #0,d0
  2850.         MOVE.w  4(a2),d7
  2851.         SUBQ    #1,d7
  2852.         MOVE.w  22(a2),d1
  2853. 'loop:  MOVE.l  d7,d0
  2854.         MOVE.l  d7,d2
  2855.         LSL     #2,d2
  2856.         MULU    d1,d0
  2857.         MOVEA.l 14(a2),a1
  2858.         ADDA.l  d0,a1
  2859.         MOVE.l  a1,8(a0,d2.l)
  2860.         DBF     d7,'loop
  2861.         MOVE.l  !s{adr},d0
  2862.         LEA     args(pc),a1
  2863.         MOVE.l  a1,d3
  2864.         MOVE.l  #MUIA_Bitmap_Bitmap,(a1)+
  2865.         MOVE.l  a0,(a1)+
  2866.         MOVE.l  #MUIA_Bitmap_Width,(a1)+
  2867.         MOVEQ   #0,d0
  2868.         MOVE.w  (a0),d0
  2869.         LSL.w   #3,d0
  2870.         MOVE.l  d0,(a1)+
  2871.         MOVE.l  #MUIA_Bitmap_Height,(a1)+
  2872.         MOVE.w  #0,(a1)+
  2873.         MOVE.w  2(a0),(a1)+
  2874.         MOVE.l  #0,(a1)
  2875.         MOVEA.l d3,a1
  2876.         MOVEA.l !s{adr},a0
  2877.         JSR     -648(a6)
  2878. 'noobj: RTS
  2879.  
  2880. _chshapepal:
  2881.         MOVE.l  a6,_IntuiBase
  2882.         TST.l   !s{adr}
  2883.         BEQ     'noobj
  2884.         MOVE.l  a0,-(a7)
  2885.         MOVE.l  !s{special},a0
  2886.         MOVE.w  6(a2),(a0)
  2887.         MOVE.w  2(a2),2(a0)
  2888.         MOVE.w  4(a2),4(a0)
  2889.         MOVEQ   #0,d7
  2890.         MOVEQ   #0,d0
  2891.         MOVE.w  4(a2),d7
  2892.         SUBQ    #1,d7
  2893.         MOVE.w  22(a2),d1
  2894. 'loop:  MOVE.l  d7,d0
  2895.         MOVE.l  d7,d2
  2896.         LSL     #2,d2
  2897.         MULU    d1,d0
  2898.         MOVEA.l 14(a2),a1
  2899.         ADDA.l  d0,a1
  2900.         MOVE.l  a1,8(a0,d2.l)
  2901.         DBF     d7,'loop
  2902.         MOVE.l  !s{adr},d0
  2903.         LEA     args(pc),a1
  2904.         MOVE.l  a1,d3
  2905.         MOVE.l  #MUIA_Bitmap_Bitmap,(a1)+
  2906.         MOVE.l  a0,(a1)+
  2907.         MOVE.l  #MUIA_Bitmap_Width,(a1)+
  2908.         MOVEQ   #0,d0
  2909.         MOVE.w  (a0),d0
  2910.         LSL.w   #3,d0
  2911.         MOVE.l  d0,(a1)+
  2912.         MOVE.l  #MUIA_Bitmap_Height,(a1)+
  2913.         MOVE.w  #0,(a1)+
  2914.         MOVE.w  2(a0),(a1)+
  2915.         MOVEA.l (a7)+,a0
  2916.         MOVE.l  #MUIA_Bitmap_SourceColors,(a1)+
  2917.         MOVEA.l (a0),a0
  2918.         LEA     4(a0),a0
  2919.         MOVE.l  a0,(a1)+
  2920.         MOVE.l  #0,(a1)
  2921.         MOVEA.l d3,a1
  2922.         MOVEA.l !s{adr},a0
  2923.         JSR     -648(a6)
  2924. 'noobj: RTS
  2925.  
  2926. .
  2927. ._addobjhgroup:
  2928.         MOVEA.l !s{tagl},a1
  2929.         TST.l   !s{tagl}
  2930.         BNE     'tlok
  2931.         MOVE.l  maxt(pc),d0
  2932.         LSL     #2,d0
  2933.         MOVE.w  d0,!s{size}
  2934.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2935.         ALibJsr $C002
  2936.         MOVE.l  d0,!s{tagl}
  2937.         BEQ     'noobj
  2938.         MOVEA.l d0,a1
  2939.         MOVE.l  #MUIA_Group_Horiz,(a1)+
  2940.         MOVE.l  #1,(a1)+
  2941.         MOVE.w  #8,!s{tagp}
  2942.         MOVEA.l d0,a1
  2943. 'tlok:  TST.l   !t{adr}
  2944.         BEQ     'noobj
  2945.         MOVE.w  !s{tagp},d6
  2946.         ADDA.w  d6,a1
  2947.         MOVE.l  #Child,(a1)+
  2948.         MOVE.l  !t{adr},(a1)
  2949.         ADDQ.w  #8,d6
  2950.         MOVE.w  d6,!s{tagp}
  2951.         MOVE.l  #-1,d0
  2952. 'noobj: RTS
  2953.  
  2954. ._createhgroup:
  2955.         MOVEQ   #0,d0
  2956.         TST.l   !s{tagl}
  2957.         BEQ     'noobj
  2958.         LEA     groupclass(pc),a0
  2959.         MOVEA.l !s{tagl},a1
  2960.         !CALLMUI        {MUI_NewObjectA}
  2961.         MOVE.l  d0,!s{adr}
  2962.         BEQ     'noobj
  2963.         MOVE.l  #-1,d0
  2964. 'noobj: RTS
  2965.  
  2966. ._addobjvgroup:
  2967.         MOVEA.l !s{tagl},a1
  2968.         TST.l   !s{tagl}
  2969.         BNE     'tlok
  2970.         MOVE.l  maxt(pc),d0
  2971.         LSL     #2,d0
  2972.         MOVE.w  d0,!s{size}
  2973.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  2974.         ALibJsr $C002
  2975.         MOVE.l  d0,!s{tagl}
  2976.         BEQ     'noobj
  2977.         MOVEA.l d0,a1
  2978.         CLR.w   !s{tagp}
  2979. 'tlok:  TST.l   !t{adr}
  2980.         BEQ     'noobj
  2981.         MOVE.w  !s{tagp},d6
  2982.         ADDA.w  d6,a1
  2983.         MOVE.l  #Child,(a1)+
  2984.         MOVE.l  !t{adr},(a1)
  2985.         ADDQ.w  #8,d6
  2986.         MOVE.w  d6,!s{tagp}
  2987.         MOVE.l  #-1,d0
  2988. 'noobj: RTS
  2989.  
  2990. ._createvgroup:
  2991.         MOVEQ   #0,d0
  2992.         TST.l   !s{tagl}
  2993.         BEQ     'noobj
  2994.         LEA     groupclass(pc),a0
  2995.         MOVEA.l !s{tagl},a1
  2996.         !CALLMUI        {MUI_NewObjectA}
  2997.         MOVE.l  d0,!s{adr}
  2998.         BEQ     'noobj
  2999.         MOVE.l  #-1,d0
  3000. 'noobj: RTS
  3001.  
  3002. ._addobjpage:
  3003.         MOVEA.l !s{tagl},a1
  3004.         TST.l   !s{tagl}
  3005.         BNE     'tlok
  3006.         MOVE.l  maxt(pc),d0
  3007.         LSL     #2,d0
  3008.         MOVE.w  d0,!s{size}
  3009.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  3010.         ALibJsr $C002
  3011.         MOVE.l  d0,!s{tagl}
  3012.         BEQ     'noobj
  3013.         MOVEA.l d0,a1
  3014.         CLR.w   !s{tagp}
  3015. 'tlok:  TST.l   !t{adr}
  3016.         BEQ     'noobj
  3017.         MOVE.w  !s{tagp},d6
  3018.         ADDA.w  d6,a1
  3019.         MOVE.l  #Child,(a1)+
  3020.         MOVE.l  !t{adr},(a1)
  3021.         ADDQ.w  #8,d6
  3022.         MOVE.w  d6,!s{tagp}
  3023.         MOVE.l  #-1,d0
  3024. 'noobj: RTS
  3025.  
  3026. ._createpage:
  3027.         MOVEQ   #0,d0
  3028.         TST.l   !s{tagl}
  3029.         BEQ     'noobj
  3030.         MOVEA.l !s{tagl},a1
  3031.         MOVE.w  !s{tagp},d6
  3032.         ADDA.w  d6,a1
  3033.         MOVE.w  #20,d0
  3034.         LSL.w   #2,d0
  3035.         MOVE.w  d0,!s{spesize}
  3036.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  3037.         ALibJsr $c002
  3038.         MOVE.l  d0,!s{special}
  3039.         BEQ     'noobj
  3040.         MOVEA.l d0,a0
  3041.         SUBQ    #1,d7
  3042. 'loop:  MOVE.l  -(a2),d1
  3043.         MOVE.l  -(a2),d0
  3044.         ALibJsr $cf01
  3045.         MOVE.l  d0,(a0)+
  3046.         DBF     d7,'loop
  3047.         MOVE.l  #0,(a0)+
  3048.         MOVE.l  #MUIA_Register_Titles,(a1)+
  3049.         MOVE.l  !s{special},(a1)+
  3050.         ADDQ.w  #8,d6
  3051.         MOVE.w  d6,!s{tagp}
  3052.         LEA     registerclass(pc),a0
  3053.         MOVEA.l !s{tagl},a1
  3054.         !CALLMUI        {MUI_NewObjectA}
  3055.         MOVE.l  d0,!s{adr}
  3056.         BEQ     'noobj
  3057.         MOVE.l  #-1,d0
  3058. 'noobj: RTS
  3059.  
  3060. _createpagea:
  3061.         MOVEQ   #0,d0
  3062.         TST.l   !s{tagl}
  3063.         BEQ     'noobj
  3064.         MOVE.l  d1,d3
  3065.         MOVE.l  #20,d0
  3066.         LSL     #2,d0
  3067.         MOVE.w  d0,!s{spesize}
  3068.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  3069.         ALibJsr $c002
  3070.         MOVE.l  d0,!s{special}
  3071.         BEQ     'noobj
  3072.         MOVEA.l d0,a0
  3073.         MOVEA.l d3,a2
  3074. 'loop:  MOVE.l  (a2)+,a1
  3075.         MOVE.l  a1,d0
  3076.         MOVEQ   #-1,d1
  3077. 'loops: ADDQ    #1,d1
  3078.         TST.b   (a1)+
  3079.         BNE     'loops
  3080.         ALibJsr $cf01
  3081.         MOVE.l  d0,(a0)+
  3082.         BNE     'loop
  3083.         MOVEA.l !s{tagl},a1
  3084.         MOVE.w  !s{tagp},d6
  3085.         ADDA.w  d6,a1
  3086.         MOVE.l  #0,(a0)+
  3087.         MOVE.l  #MUIA_Register_Titles,(a1)+
  3088.         MOVE.l  !s{special},(a1)+
  3089.         ADDQ.w  #8,d6
  3090.         MOVE.w  d6,!s{tagp}
  3091.         LEA     registerclass(pc),a0
  3092.         MOVEA.l !s{tagl},a1
  3093.         !CALLMUI        {MUI_NewObjectA}
  3094.         MOVE.l  d0,!s{adr}
  3095.         BEQ     'noobj
  3096.         MOVE.l  #-1,d0
  3097. 'noobj: RTS
  3098.  
  3099.  
  3100. CNIF    #First_Compile=0
  3101.  
  3102. _addobjh:
  3103.         SUBQ    #1,d7
  3104. 'loop:  MOVE.w  -(a2),d1
  3105.         MOVEM.l d0/d7/a2,-(a7)
  3106.         ALibJsr MUIAddObjHGroup
  3107.         MOVEM.l (a7)+,d0/d7/a2
  3108.         DBF     d7,'loop
  3109.         RTS
  3110.  
  3111.  
  3112. _addobjv:
  3113.         SUBQ    #1,d7
  3114. 'loop:  MOVE.w  -(a2),d1
  3115.         MOVEM.l d0/d7/a2,-(a7)
  3116.         ALibJsr MUIAddObjVGroup
  3117.         MOVEM.l (a7)+,d0/d7/a2
  3118.         DBF     d7,'loop
  3119.         RTS
  3120.  
  3121.  
  3122. _addobjp:
  3123.         SUBQ    #1,d7
  3124. 'loop:  MOVE.w  -(a2),d1
  3125.         MOVEM.l d0/d7/a2,-(a7)
  3126.         ALibJsr MUIAddObjPage
  3127.         MOVEM.l (a7)+,d0/d7/a2
  3128.         DBF     d7,'loop
  3129.         RTS
  3130.  
  3131. CEND
  3132.  
  3133. .
  3134. ._insertsingle:
  3135.         MOVEQ   #0,d0
  3136.         TST.l   !s{adr}
  3137.         BEQ     'noobj
  3138.         MOVE.l  d1,d4
  3139.         CMP.w   #1,d7
  3140.         BGT     'col
  3141.         MOVE.l  -(a2),d1
  3142.         MOVE.l  -(a2),d0
  3143.         ALibJsr $cf01
  3144.         MOVE.l  d0,d2
  3145.         BRA     'nocol
  3146. 'col:   MOVE.w  d7,d0
  3147.         ADDQ    #1,d0
  3148.         LSL     #2,d0
  3149.         MOVE.l  #MEMF_PUBLIC|MEMF_CLEAR,d1
  3150.         ALibJsr $c002
  3151.         MOVE.l  d0,d2
  3152.         BEQ     'noobj
  3153.         MOVEA.l d2,a0
  3154.         SUBQ    #1,d7
  3155. 'loop:  MOVE.l  -(a2),d1
  3156.         MOVE.l  -(a2),d0
  3157.         ALibJsr $cf01
  3158.         MOVE.l  d0,(a0)+
  3159.         DBF     d7,'loop
  3160.         MOVE.l  #0,(a0)+
  3161. 'nocol: MOVE.l  !s{adr},d0
  3162.         LEA     args(pc),a0
  3163.         MOVE.l  a0,d1
  3164.         MOVE.l  #MUIM_List_InsertSingle,(a0)+
  3165.         MOVE.l  d2,(a0)+
  3166.         MOVE.l  d4,(a0)+
  3167.         MOVE.l  #0,(a0)+
  3168.         BSR     _domethoda
  3169. 'noobj: RTS
  3170.  
  3171.  
  3172.  
  3173. _insertsinglea:
  3174.         MOVEQ   #0,d0
  3175.         TST.l   !s{adr}
  3176.         BEQ     'noobj
  3177.         MOVE.l  d1,d4
  3178.         MOVE.l  !s{adr},d0
  3179.         LEA     args(pc),a0
  3180.         MOVE.l  a0,d1
  3181.         MOVE.l  #MUIM_List_InsertSingle,(a0)+
  3182.         MOVE.l  d2,(a0)+
  3183.         MOVE.l  d4,(a0)+
  3184.         MOVE.l  #0,(a0)+
  3185.         BSR     _domethoda
  3186. 'noobj: RTS
  3187.  
  3188. ._removesingle:
  3189.         MOVEQ   #0,d0
  3190.         MOVE.l  !s{adr},d0
  3191.         BEQ     'noobj
  3192.         LEA     args(pc),a0
  3193.         MOVE.l  a0,d2
  3194.         MOVE.l  #MUIM_List_Remove,(a0)+
  3195.         MOVE.l  d1,(a0)+
  3196.         MOVE.l  #0,(a0)+
  3197.         MOVE.l  d2,d1
  3198.         BSR     _domethoda
  3199. 'noobj: RTS
  3200.  
  3201. ._redrawsingle:
  3202.         MOVEQ   #0,d0
  3203.         MOVE.l  !s{adr},d0
  3204.         BEQ     'noobj
  3205.         LEA     args(pc),a0
  3206.         MOVE.l  a0,d2
  3207.         MOVE.l  #MUIM_List_Redraw,(a0)+
  3208.         MOVE.l  d1,(a0)+
  3209.         MOVE.l  #0,(a0)+
  3210.         MOVE.l  d2,d1
  3211.         BSR     _domethoda
  3212. 'noobj: RTS
  3213.  
  3214. ._listtitle:
  3215.         MOVE.l  a6,_IntuiBase
  3216.         MOVEQ   #0,d0
  3217.         TST.l   !s{adr}
  3218.         BEQ     'noobj
  3219.         CMP.w   #1,d7
  3220.         BGT     'col
  3221.         MOVE.l  -(a2),d1
  3222.         MOVE.l  -(a2),d0
  3223.         ALibJsr $cf01
  3224.         MOVE.l  d0,d2
  3225.         MOVE.l  !s{adr},d0
  3226.         MOVE.l  #MUIA_List_Title,d1
  3227.         BSR     _set
  3228.         BRA     'noobj
  3229. 'col:   MOVEA.l !s{spe2},a0
  3230.         ADDA.l  #24,a0
  3231.         SUBQ    #1,d7
  3232. 'loop:  MOVE.l  -(a2),d1
  3233.         MOVE.l  -(a2),d0
  3234.         ALibJsr $cf01
  3235.         MOVE.l  d0,(a0)+
  3236.         DBF     d7,'loop
  3237.         MOVE.l  #0,(a0)+
  3238.         MOVE.l  !s{adr},d0
  3239.         MOVE.l  #MUIA_List_Title,d1
  3240.         MOVEQ.l #1,d2
  3241.         BSR     _set
  3242. 'noobj: RTS
  3243.  
  3244. _listtitlea:
  3245.         MOVE.l  a6,_IntuiBase
  3246.         MOVEQ   #0,d0
  3247.         TST.l   !s{adr}
  3248.         BEQ     'noobj
  3249.         MOVEA.l !s{spe2},a0
  3250.         ADDA.l  #24,a0
  3251.         MOVEA.l d1,a1
  3252. 'loop:  MOVE.l  (a1)+,(a0)+
  3253.         BNE     'loop
  3254.         MOVE.l  #0,(a0)+
  3255.         MOVE.l  !s{adr},d0
  3256.         MOVE.l  #MUIA_List_Title,d1
  3257.         MOVEQ.l #1,d2
  3258.         BSR     _set
  3259. 'noobj: RTS
  3260.  
  3261. .
  3262. ._muiset:
  3263.         TST     !s{adr}
  3264.         BEQ     'noobj
  3265.         MOVEA.l !s{adr},a0
  3266.         LEA     args(pc),a1
  3267.         MOVE.l  a1,d0
  3268.         SUBQ    #1,d7
  3269. 'loop:  MOVE.l  -(a2),(a1)+
  3270.         DBF     d7,'loop
  3271.         MOVE.l  #0,(a1)+
  3272.         MOVEA.l d0,a1
  3273.         JSR     -648(a6)
  3274. 'noobj: RTS
  3275.  
  3276. _muiseta:
  3277.         TST     !s{adr}
  3278.         BEQ     'noobj
  3279.         MOVEA.l !s{adr},a0
  3280.         MOVEA.l d1,a1
  3281.         JSR     -648(a6)
  3282. 'noobj: RTS
  3283.  
  3284. ._muiget:
  3285.         MOVEA.l !s{adr},a0
  3286.         MOVE.l  d1,d0
  3287.         LEA     stp(pc),a1
  3288.         JSR     -654(a6)
  3289.         MOVE.l  stp(pc),d0
  3290. 'noobj: RTS
  3291.  
  3292. ._redraw:
  3293.         TST.l   !s{adr}
  3294.         BEQ     'noobj
  3295.         MOVEA.l !s{adr},a0
  3296.         MOVE.l  d1,d0
  3297.         !CALLMUI        {MUI_Redraw}
  3298.         MOVEQ   #-1,d0
  3299. 'noobj: RTS
  3300.  
  3301.  
  3302. ._dmethod:
  3303.         MOVEQ   #0,d0
  3304.         TST.l   !s{adr}
  3305.         BEQ     'noobj
  3306.         MOVE.l  !s{adr},d0
  3307.         LEA     args(pc),a1
  3308.         MOVE.l  a1,d3
  3309.         MOVE.l  d1,(a1)+
  3310.         SUBQ    #1,d7
  3311. 'loop:  MOVE.l  -(a2),(a1)+
  3312.         DBF     d7,'loop
  3313.         MOVE.l  d3,d1
  3314.         BSR     _domethoda
  3315. 'noobj: RTS
  3316.  
  3317. _dmethoda:
  3318.         MOVEQ   #0,d0
  3319.         TST.l   !s{adr}
  3320.         BEQ     'noobj
  3321.         MOVE.l  !s{adr},d0
  3322.         LEA     args(pc),a1
  3323.         MOVE.l  a1,d3
  3324.         MOVE.l  d1,(a1)+
  3325.         MOVE.l  d2,a2
  3326. 'loop:  MOVE.l  (a2)+,(a1)+
  3327.         BNE     'loop
  3328.         MOVE.l  d3,d1
  3329.         BSR     _domethoda
  3330. 'noobj: RTS
  3331.  
  3332. ._notify:
  3333.         TST.l   !s{adr}
  3334.         BEQ     'noobj
  3335.         TST.l   !u{adr}
  3336.         BEQ     'noobj
  3337.         LEA     args(pc),a1
  3338.         MOVE.l  a1,d3
  3339.         MOVE.l  #MUIM_Notify,(a1)+
  3340.         MOVE.l  d1,(a1)+
  3341.         MOVE.l  d2,(a1)+
  3342.         MOVE.l  !u{adr},(a1)+
  3343.         MOVE.w  #0,(a1)+
  3344.         MOVE.w  d7,(a1)+
  3345.         SUBQ    #1,d7
  3346. 'loop:  MOVE.l  -(a2),(a1)+
  3347.         DBF     d7,'loop
  3348.         MOVE.l  d3,d1
  3349.         MOVE.l  !s{adr},d0
  3350.         BSR     _domethoda
  3351. 'noobj: RTS
  3352.  
  3353.  
  3354. _notifya:
  3355.         TST.l   !s{adr}
  3356.         BEQ     'noobj
  3357.         TST.l   !u{adr}
  3358.         BEQ     'noobj
  3359.         LEA     args(pc),a1
  3360.         MOVE.l  a1,d3
  3361.         MOVE.l  #MUIM_Notify,(a1)+
  3362.         MOVE.l  d1,(a1)+
  3363.         MOVE.l  d2,(a1)+
  3364.         MOVE.l  !u{adr},(a1)+
  3365.         MOVEA.l d4,a2
  3366.         MOVEQ   #-1,d7
  3367. 'loop1: ADDQ    #1,d7
  3368.         TST.l   (a2)+
  3369.         BNE     'loop1
  3370.         MOVE.l  d7,(a1)+
  3371.         MOVEA.l d4,a2
  3372. 'loop2: MOVE.l  (a2)+,(a1)+
  3373.         BNE     'loop2
  3374.         MOVE.l  d3,d1
  3375.         MOVE.l  !s{adr},d0
  3376.         BSR     _domethoda
  3377. 'noobj: RTS
  3378.  
  3379. _notifyapp:
  3380.         TST.l   !s{adr}
  3381.         BEQ     'noobj
  3382.         TST.l   appaddr
  3383.         BEQ     'noobj
  3384.         LEA     args(pc),a1
  3385.         MOVE.l  a1,d4
  3386.         MOVE.l  #MUIM_Notify,(a1)+
  3387.         MOVE.l  d1,(a1)+
  3388.         MOVE.l  d2,(a1)+
  3389.         MOVE.l  appaddr(pc),(a1)+
  3390.         MOVE.l  #2,(a1)+
  3391.         MOVE.l  #MUIM_Application_ReturnID,(a1)+
  3392.         MOVE.l  d3,(a1)+
  3393.         MOVE.l  #0,(a1)
  3394.         MOVE.l  d4,d1
  3395.         MOVE.l  !s{adr},d0
  3396.         BSR     _domethoda
  3397. 'noobj: RTS
  3398.  
  3399.  
  3400. ._event:
  3401.         TST.l   appaddr
  3402.         BEQ     'noapp
  3403.         MOVE.l  appaddr(pc),d0
  3404.         LEA     args(pc),a0
  3405.         MOVE.l  a0,d1
  3406.         MOVE.l  #MUIM_Application_NewInput,(a0)+
  3407.         LEA     sigs(pc),a1
  3408.         MOVE.l  a1,(a0)+
  3409.         BSR     _domethoda
  3410. 'noapp: RTS
  3411.  
  3412. ._waitevent:
  3413.         TST.l   appaddr
  3414.         BEQ     'noapp
  3415.         MOVE.l  sigs(pc),d0
  3416.         BEQ     'nosigs
  3417.         MOVE.l  4,a6
  3418.         JSR     -318(a6)
  3419. 'nosigs:BRA     _event
  3420. 'noapp: RTS
  3421.  
  3422. ._findudata:
  3423.         TST.l   !t{adr}
  3424.         BEQ     'noobj
  3425.         LEA     args(pc),a0
  3426.         MOVE.l  a0,d1
  3427.         MOVE.l  #MUIM_FindUData,(a0)+
  3428.         MOVE.l  d2,(a0)+
  3429.         MOVE.l  #0,(a0)
  3430.         MOVE.l  !t{adr},d0
  3431.         BSR     _domethoda
  3432.         MOVE.l  d0,!s{adr}
  3433.         CLR.l   !s{tagl}
  3434.         CLR.l   !s{special}
  3435.         MOVE.l  #-1,d0
  3436. 'noobj: RTS
  3437.  
  3438. .
  3439. ._freeobj:
  3440.         MOVEM.l d0-d1/a1,-(a7)
  3441.         CMP.w   #kind_app,!s{kind}
  3442.         BEQ     'nospe2
  3443.         MOVE.l  !s{size},d0
  3444.         BEQ     'notl
  3445.         MOVE.l  !s{tagl},d1
  3446.         BEQ     'notl
  3447.         MOVEA.l d1,a1
  3448.         ALibJsr $c003
  3449. 'notl:  MOVE.l  !s{spesize},d0
  3450.         BEQ     'nospe
  3451.         MOVE.l  !s{special},d1
  3452.         BEQ     'nospe
  3453.         MOVEA.l d1,a1
  3454.         ALibJsr $c003
  3455. 'nospe: MOVE.l  !s{spe2size},d0
  3456.         BEQ     'nospe2
  3457.         MOVE.l  !s{spe2},d1
  3458.         BEQ     'nospe2
  3459.         MOVEA.l d1,a1
  3460.         ALibJsr $c003
  3461. 'nospe2:MOVEM.l (a7)+,d0-d1/a1
  3462.         RTS
  3463.  
  3464.  
  3465.  
  3466. _domethoda: ;DoMethodA(obj,msg)(d0/d1)
  3467.         TST.l   d0
  3468.         BEQ.b   cmnullreturn
  3469.         MOVE.l  d0,a2
  3470.         MOVE.l  d1,a1
  3471.         MOVE.l  -4(a2),a0
  3472. cminvoke:
  3473.         PEA.l   cmreturn(pc)
  3474.         MOVE.l  8(a0),-(a7)
  3475.         RTS
  3476.  
  3477. cmnullreturn:
  3478.         MOVEQ   #0,d0
  3479. cmreturn:
  3480.         RTS
  3481.  
  3482. _set:   ;set(obj,attr,value)(d0/d1/d2)
  3483.         MOVEM.l a0-a1/a6,-(a7)
  3484.         MOVEA.l _IntuiBase(pc),a6
  3485.         MOVEA.l d0,a0
  3486.         LEA     args(pc),a1
  3487.         MOVE.l  a1,d0
  3488.         MOVE.l  d1,(a1)+
  3489.         MOVE.l  d2,(a1)+
  3490.         MOVE.l  #0,(a1)+
  3491.         MOVE.l  d0,a1
  3492.         JSR     -648(a6)
  3493.         MOVEM.l (a7)+,a0-a1/a6
  3494.         RTS
  3495.  
  3496.         Even
  3497.  
  3498. DHook:
  3499.         Dc.l  $B3FC0000   ;
  3500.         Dc.w  $0000       ;        cmpa.l  #0,a1
  3501.         Dc.w  $6706       ;        beq.s   .titles
  3502.         Dc.w  $24D9       ;.loop   move.l  (a1)+,(a2)+
  3503.         Dc.w  $66FC       ;        bne.s   .loop
  3504.         Dc.w  $6008       ;        bra.s   .end
  3505.         Dc.l  $43FA0008   ;.titles lea     tit(pc),a1
  3506.         Dc.w  $24D9       ;.loop2  move.l  (a1)+,(a2)+
  3507.         Dc.w  $66FC       ;        bne.s   .loop2
  3508.         Dc.w  $4E75       ;.end    rts
  3509.         Dc.l  0           ;tit     dc.l    0
  3510.         Even
  3511.  
  3512. _MUIBase:   Dc.l  0
  3513. _IntuiBase: Dc.l  0
  3514.  
  3515. s0:       Dc.l  0
  3516. s1:       Dc.l  0
  3517. s2:       Dc.l  0
  3518.  
  3519. tits:     Dc.l  0
  3520.  
  3521. stp:      Dc.l  0
  3522.  
  3523. sigs:     Dc.l  0
  3524.  
  3525. str:      Dc.l  0,0
  3526.  
  3527. args:     Dcb.l 40,0
  3528. temp:     Dcb.l 20,0
  3529.  
  3530. Even
  3531.  
  3532. appstruct:
  3533. appaddr:        Dc.l    0
  3534. appkind:        Dc.w    4
  3535. apptags:        Dc.l    0
  3536. apptap:         Dc.w    0
  3537. appsize:        Dc.w    160
  3538. appspecial:     Dc.l    0
  3539. appspesize:     Dc.w    0
  3540.  
  3541. Even
  3542.  
  3543.  
  3544. ;************************************************************
  3545. ;*                        ERRORS                            *
  3546. ;************************************************************
  3547. .
  3548. .errors:
  3549. err1:   MOVEQ.l #1,d0
  3550.         TRAP    #0
  3551.  
  3552. Even
  3553.  
  3554. initerr:
  3555.         MOVE.l  #MUI_INIT_ERR,d0
  3556.         TRAP    #0
  3557.  
  3558. Even
  3559.  
  3560. MUI_INIT_ERR:
  3561.         Dc.b    "MUILib INIT ERROR!!!",0
  3562.         Even
  3563.  
  3564.  
  3565. ;************************************************************
  3566. ;*                         DATAS                            *
  3567. ;************************************************************
  3568.  
  3569. uhook:          Dc.l    0
  3570.  
  3571. maxt:           Dc.l    51
  3572.  
  3573. cenc:           Dc.b    $1B,$63,$00,$1B
  3574.  
  3575.         Even
  3576.  
  3577. appclass:       Dc.b    "Application.mui",0
  3578. winclass:       Dc.b    "Window.mui",0
  3579. groupclass:     Dc.b    "Group.mui",0
  3580. imageclass:     Dc.b    "Image.mui",0
  3581. rectangleclass: Dc.b    "Rectangle.mui",0
  3582. stringclass:    Dc.b    "String.mui",0
  3583. textclass:      Dc.b    "Text.mui",0
  3584. cycleclass:     Dc.b    "Cycle.mui",0
  3585. radioclass:     Dc.b    "Radio.mui",0
  3586. sliderclass:    Dc.b    "Slider.mui",0
  3587. registerclass:  Dc.b    "Register.mui",0
  3588. listclass:      Dc.b    "List.mui",0
  3589. listviewclass:  Dc.b    "Listview.mui",0
  3590. balanceclass:   Dc.b    "Balance.mui",0
  3591. bitmapclass:    Dc.b    "Bitmap.mui",0
  3592.  
  3593.         Even
  3594. ver:            Dc.b    "$VER: EFMUILib version 1.4 (01.02.98) (C)opyRight 1997/1998 by Vivid Imagination",0
  3595.         Even
  3596.